File espeak-volume-full-fix.diff of Package espeak
---
src/wave_pulse.cpp | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
--- a/src/wave_pulse.cpp
+++ b/src/wave_pulse.cpp
@@ -114,9 +114,6 @@
static pa_stream *stream = NULL;
static pa_threaded_mainloop *mainloop = NULL;
-static pa_cvolume volume;
-static int volume_valid = 0;
-
static int do_trigger = 0;
static uint64_t written = 0;
static int time_offset_msec = 0;
@@ -171,9 +168,6 @@
if (!i)
return;
-
- volume = i->volume;
- volume_valid = 1;
}
static void subscribe_cb(struct pa_context *c, enum pa_subscription_event_type t, uint32_t index, void *userdata) {
@@ -514,12 +508,6 @@
if (!pa_sample_spec_valid(&ss))
return false;
-/* if (!volume_valid) { */
- pa_cvolume_reset(&volume, ss.channels);
- volume_valid = 1;
-/* } else if (volume.channels != ss.channels) */
-/* pa_cvolume_set(&volume, ss.channels, pa_cvolume_avg(&volume)); */
-
SHOW_TIME("pa_threaded_mainloop_new (call)");
if (!(mainloop = pa_threaded_mainloop_new())) {
SHOW("Failed to allocate main loop\n","");
@@ -583,7 +571,7 @@
a_attr.fragsize = 0;
SHOW_TIME("pa_connect_playback");
- if (pa_stream_connect_playback(stream, NULL, &a_attr, (pa_stream_flags_t)(PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE), &volume, NULL) < 0) {
+ if (pa_stream_connect_playback(stream, NULL, &a_attr, (pa_stream_flags_t)(PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE), NULL, NULL) < 0) {
SHOW("Failed to connect stream: %s", pa_strerror(pa_context_errno(context)));
goto unlock_and_fail;
}
@@ -630,11 +618,6 @@
pa_threaded_mainloop_wait(mainloop);
}
-/* if (!volume_valid) { */
-/* SHOW("pa_context_get_sink_input_info() failed: %s", pa_strerror(pa_context_errno(context))); */
-/* goto unlock_and_fail; */
-/* } */
-
do_trigger = 0;
written = 0;
time_offset_msec = 0;