mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 14:25:49 +00:00
Bug 586229 Update sydney_audio_sunaudio.c to fix a/v choppy issue r=kinetik a=NPOTB
This commit is contained in:
parent
dbc20051fe
commit
ae4f371e8e
@ -235,7 +235,7 @@ sa_stream_open(sa_stream_t *s) {
|
||||
s->using_oss = false;
|
||||
/* Try to use OSS if available */
|
||||
if (dsp_device_name) {
|
||||
fd = open(dsp_device_name, O_WRONLY, 0);
|
||||
fd = open(dsp_device_name, O_WRONLY | O_NONBLOCK);
|
||||
if (fd >= 0) {
|
||||
s->using_oss = true;
|
||||
}
|
||||
@ -560,14 +560,8 @@ sa_stream_pause(sa_stream_t *s) {
|
||||
return SA_ERROR_NO_INIT;
|
||||
}
|
||||
|
||||
if (s->using_oss) {
|
||||
return SA_ERROR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
int result = SA_SUCCESS;
|
||||
|
||||
pthread_mutex_lock(&s->mutex);
|
||||
result = shutdown_device(s);
|
||||
int result = shutdown_device(s);
|
||||
if (result == SA_SUCCESS) {
|
||||
s->output_fd = -1;
|
||||
}
|
||||
@ -583,10 +577,6 @@ sa_stream_resume(sa_stream_t *s) {
|
||||
return SA_ERROR_NO_INIT;
|
||||
}
|
||||
|
||||
if (s->using_oss) {
|
||||
return SA_ERROR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&s->mutex);
|
||||
int result = sa_stream_open(s);
|
||||
pthread_mutex_unlock(&s->mutex);
|
||||
@ -625,10 +615,6 @@ shutdown_device(sa_stream_t *s) {
|
||||
return SA_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* -----------------------------------------------------------------------------
|
||||
* Startup and shutdown functions
|
||||
* -----------------------------------------------------------------------------
|
||||
/*
|
||||
* -----------------------------------------------------------------------------
|
||||
* Extension functions
|
||||
|
Loading…
x
Reference in New Issue
Block a user