mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 38414f29834c (bug 928797) on suspicion of turning bug 701384 permaorange on a CLOSED TREE
This commit is contained in:
parent
45a4bfd8a6
commit
fd28f5ff9a
@ -299,7 +299,7 @@ audiounit_stream_init(cubeb * context, cubeb_stream ** stream, char const * stre
|
||||
#endif
|
||||
cubeb_stream * stm;
|
||||
AURenderCallbackStruct input;
|
||||
unsigned int buffer_size, default_buffer_size;
|
||||
unsigned int buffer_size;
|
||||
OSStatus r;
|
||||
UInt32 size;
|
||||
AudioDeviceID output_device_id;
|
||||
@ -408,29 +408,15 @@ audiounit_stream_init(cubeb * context, cubeb_stream ** stream, char const * stre
|
||||
buffer_size = (unsigned int) latency_range.mMaximum;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the default buffer size. If our latency request is below the default,
|
||||
* set it. Otherwise, use the default latency.
|
||||
**/
|
||||
r = AudioUnitGetProperty(stm->unit, kAudioDevicePropertyBufferFrameSize,
|
||||
kAudioUnitScope_Output, 0, &default_buffer_size, &size);
|
||||
|
||||
/* Set the maximum number of frame that the render callback will ask for,
|
||||
* effectively setting the latency of the stream. This is process-wide. */
|
||||
r = AudioUnitSetProperty(stm->unit, kAudioDevicePropertyBufferFrameSize,
|
||||
kAudioUnitScope_Output, 0, &buffer_size, sizeof(buffer_size));
|
||||
if (r != 0) {
|
||||
audiounit_stream_destroy(stm);
|
||||
return CUBEB_ERROR;
|
||||
}
|
||||
|
||||
if (buffer_size < default_buffer_size) {
|
||||
/* Set the maximum number of frame that the render callback will ask for,
|
||||
* effectively setting the latency of the stream. This is process-wide. */
|
||||
r = AudioUnitSetProperty(stm->unit, kAudioDevicePropertyBufferFrameSize,
|
||||
kAudioUnitScope_Output, 0, &buffer_size, sizeof(buffer_size));
|
||||
if (r != 0) {
|
||||
audiounit_stream_destroy(stm);
|
||||
return CUBEB_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
r = AudioUnitSetProperty(stm->unit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input,
|
||||
0, &ss, sizeof(ss));
|
||||
if (r != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user