142 |
|
silence_byte = 0x80; |
143 |
|
} else { |
144 |
|
unsigned long sup_format; |
145 |
< |
ioctl(audio_fd, SNDCTL_DSP_GETFMTS, &format); |
145 |
> |
ioctl(audio_fd, SNDCTL_DSP_GETFMTS, &sup_format); |
146 |
|
if (sup_format & AFMT_S16_BE) { |
147 |
|
little_endian = false; |
148 |
|
format = AFMT_S16_BE; |
284 |
|
|
285 |
|
void AudioInit(void) |
286 |
|
{ |
287 |
– |
char str[256]; |
288 |
– |
|
287 |
|
// Init audio status (reasonable defaults) and feature flags |
288 |
|
AudioStatus.sample_rate = 44100 << 16; |
289 |
|
AudioStatus.sample_size = 16; |
375 |
|
* Streaming function |
376 |
|
*/ |
377 |
|
|
380 |
– |
static uint32 apple_stream_info; // Mac address of SoundComponentData struct describing next buffer |
381 |
– |
|
378 |
|
static void *stream_func(void *arg) |
379 |
|
{ |
380 |
|
int16 *silent_buffer = new int16[sound_buffer_size / 2]; |