Bug 1270004 - Update libcubeb. rs=jesup

This commit is contained in:
Matthew Gregan 2016-05-06 10:36:41 +12:00
parent 42c8a323e9
commit dc5d4004b3
4 changed files with 23 additions and 10 deletions

View File

@ -5,4 +5,4 @@ Makefile.in build files for the Mozilla build system.
The cubeb git repository is: git://github.com/kinetiknz/cubeb.git
The git commit ID used was b576c355498b44a277f00b6a7d006549b3519013.
The git commit ID used was 2b3d6dc8c4353c38d3e9e2bdc9a688d6d632ac19.

View File

@ -796,7 +796,11 @@ alsa_stream_init(cubeb * ctx, cubeb_stream ** stream, char const * stream_name,
assert(ctx && stream);
assert(!input_stream_params && "not supported.");
if (input_stream_params) {
/* Capture support not yet implemented. */
return CUBEB_ERROR_NOT_SUPPORTED;
}
if (input_device || output_device) {
/* Device selection not yet implemented. */
return CUBEB_ERROR_DEVICE_UNAVAILABLE;

View File

@ -151,6 +151,12 @@ audiotimestamp_to_latency(AudioTimeStamp const * tstamp, cubeb_stream * stream)
return ((pres - now) * stream->output_desc.mSampleRate) / 1000000000LL;
}
static void
audiounit_make_silent(AudioBuffer * ioData)
{
memset(ioData->mData, 0, ioData->mDataByteSize);
}
static OSStatus
audiounit_input_callback(void * user_ptr,
AudioUnitRenderActionFlags * flags,
@ -193,7 +199,12 @@ audiounit_input_callback(void * user_ptr,
bus,
input_frames,
&input_buffer_list);
assert(r == noErr);
if (r != noErr) {
LOG("Input AudioUnitRender failed with error=%d", r);
audiounit_make_silent(input_buffer);
return r;
}
LOG("- input: buffers %d, size %d, channels %d, frames %d\n",
input_buffer_list.mNumberBuffers,
input_buffer_list.mBuffers[0].mDataByteSize,
@ -231,12 +242,6 @@ audiounit_input_callback(void * user_ptr,
return noErr;
}
static void
audiounit_make_silent(AudioBuffer * ioData)
{
memset(ioData->mData, 0, ioData->mDataByteSize);
}
static OSStatus
audiounit_output_callback(void * user_ptr,
AudioUnitRenderActionFlags * flags,

View File

@ -398,7 +398,11 @@ winmm_stream_init(cubeb * context, cubeb_stream ** stream, char const * stream_n
XASSERT(context);
XASSERT(stream);
XASSERT(!input_stream_params && "not supported.");
if (input_stream_params) {
/* Capture support not yet implemented. */
return CUBEB_ERROR_NOT_SUPPORTED;
}
if (input_device || output_device) {
/* Device selection not yet implemented. */
return CUBEB_ERROR_DEVICE_UNAVAILABLE;