Lines 58-64
Link Here
|
58 |
sio_initpar(&par); |
58 |
sio_initpar(&par); |
59 |
par.rate = params.sample_rate(); |
59 |
par.rate = params.sample_rate(); |
60 |
par.pchan = params.channels(); |
60 |
par.pchan = params.channels(); |
61 |
par.bits = SampleFormatToBitsPerChannel(kSampleFormat); |
61 |
par.bits = SampleFormatToBitsPerChannel(kSampleFormat); |
62 |
par.bps = par.bits / 8; |
62 |
par.bps = par.bits / 8; |
63 |
par.sig = sig = par.bits != 8 ? 1 : 0; |
63 |
par.sig = sig = par.bits != 8 ? 1 : 0; |
64 |
par.le = SIO_LE_NATIVE; |
64 |
par.le = SIO_LE_NATIVE; |
Lines 139-144
Link Here
|
139 |
pthread_mutex_unlock(&mutex); |
139 |
pthread_mutex_unlock(&mutex); |
140 |
} |
140 |
} |
141 |
|
141 |
|
|
|
142 |
// This stream is always used with sub second buffer sizes, where it's |
143 |
// sufficient to simply always flush upon Start(). |
144 |
void SndioAudioOutputStream::Flush() {} |
145 |
|
142 |
void SndioAudioOutputStream::ThreadLoop(void) { |
146 |
void SndioAudioOutputStream::ThreadLoop(void) { |
143 |
int avail, count, result; |
147 |
int avail, count, result; |
144 |
|
148 |
|
Lines 153-159
Link Here
|
153 |
|
157 |
|
154 |
// Get data to play |
158 |
// Get data to play |
155 |
const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay, |
159 |
const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay, |
156 |
params.sample_rate()); |
160 |
params.sample_rate()); |
157 |
count = source->OnMoreData(delay, base::TimeTicks::Now(), 0, audio_bus.get()); |
161 |
count = source->OnMoreData(delay, base::TimeTicks::Now(), 0, audio_bus.get()); |
158 |
audio_bus->ToInterleaved(count, SampleFormatToBytesPerChannel(kSampleFormat), buffer); |
162 |
audio_bus->ToInterleaved(count, SampleFormatToBytesPerChannel(kSampleFormat), buffer); |
159 |
if (count == 0) { |
163 |
if (count == 0) { |