diff -u -u -r1.25 ifusionsoundstream.c
--- src/ifusionsoundstream.c 29 Apr 2004 21:37:24 -0000 1.25
+++ src/ifusionsoundstream.c 18 May 2004 19:40:43 -0000
@@ -257,6 +257,9 @@
data->pos_write = data->pos_read;
data->filled = 0;
+ /* flush pending sound data so we don't have to wait */
+ fs_core_reset( data->core );
+
pthread_mutex_unlock( &data->lock );
return DFB_OK;
diff -u -u -r1.29 core_sound.c
--- src/core/core_sound.c 5 May 2004 09:32:49 -0000 1.29
+++ src/core/core_sound.c 18 May 2004 19:40:45 -0000
@@ -366,6 +366,12 @@
return DFB_OK;
}
+void
+fs_core_reset( CoreSound *core )
+{
+ ioctl( core->fd, SNDCTL_DSP_RESET, 0 );
+}
+
int
fs_core_output_delay( CoreSound *core )
{
@@ -394,6 +400,12 @@
bool empty = true;
+ struct sched_param param;
+ int policy;
+ pthread_t pthread = pthread_self();
+ pthread_getschedparam(pthread, &policy, ¶m);
+ param.sched_priority = 10;
+ pthread_setschedparam(pthread, SCHED_RR, ¶m);
while (true) {
int i;
diff -u -u -r1.5 core_sound.h
--- src/core/core_sound.h 30 Mar 2004 18:57:44 -0000 1.5
+++ src/core/core_sound.h 18 May 2004 19:40:45 -0000
@@ -62,5 +62,10 @@
*/
int fs_core_output_delay( CoreSound *core );
+/*
+ * Resets the sound device
+ */
+void fs_core_reset( CoreSound *core );
+
#endif
LinuxTV legacy CVS <linuxtv.org/cvs>