Mercurial > audlegacy
comparison src/audacious/output.c @ 4230:b3e82a1eb129
Experimental patch to fix pulseaudio deficencies by sleeping 10000us.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Fri, 01 Feb 2008 13:15:05 -0600 |
parents | 833e5faa5847 |
children | 58bc8f042f69 |
comparison
equal
deleted
inserted
replaced
4221:c399e0fa9791 | 4230:b3e82a1eb129 |
---|---|
488 while (op->buffer_free() < writable) /* wait output buf */ | 488 while (op->buffer_free() < writable) /* wait output buf */ |
489 { | 489 { |
490 GTimeVal pb_abs_time; | 490 GTimeVal pb_abs_time; |
491 | 491 |
492 g_get_current_time(&pb_abs_time); | 492 g_get_current_time(&pb_abs_time); |
493 g_time_val_add(&pb_abs_time, (cfg.output_buffer_size / 2) * 1000); | 493 g_time_val_add(&pb_abs_time, 10000); |
494 | 494 |
495 if (going && !*going) /* thread stopped? */ | 495 if (going && !*going) /* thread stopped? */ |
496 return; /* so finish */ | 496 return; /* so finish */ |
497 | 497 |
498 if (ip_data.stop) /* has a stop been requested? */ | 498 if (ip_data.stop) /* has a stop been requested? */ |
499 return; /* yes, so finish */ | 499 return; /* yes, so finish */ |
500 | 500 |
501 /* else sleep for retry */ | 501 /* else sleep for retry */ |
502 #ifndef GDK_WINDOWING_QUARTZ | |
503 g_mutex_lock(playback->pb_change_mutex); | 502 g_mutex_lock(playback->pb_change_mutex); |
504 g_cond_timed_wait(playback->pb_change_cond, playback->pb_change_mutex, &pb_abs_time); | 503 g_cond_timed_wait(playback->pb_change_cond, playback->pb_change_mutex, &pb_abs_time); |
505 g_mutex_unlock(playback->pb_change_mutex); | 504 g_mutex_unlock(playback->pb_change_mutex); |
506 #else | |
507 /* Darwin threading sucks. */ | |
508 g_usleep(10000); | |
509 #endif | |
510 } | 505 } |
511 | 506 |
512 if (ip_data.stop) | 507 if (ip_data.stop) |
513 return; | 508 return; |
514 | 509 |