Mercurial > mplayer.hg
comparison libao2/ao_macosx.c @ 15448:324046793f7c
indicate the number of channels required, patch by Chris Roccati <roccati@pobox.com>
author | nplourde |
---|---|
date | Sat, 14 May 2005 01:14:58 +0000 |
parents | 21f44596f356 |
children | 1f3e8d675f0a |
comparison
equal
deleted
inserted
replaced
15447:a246c4454efc | 15448:324046793f7c |
---|---|
335 // try 2: set only rate & type, no format details (bits, channels etc) | 335 // try 2: set only rate & type, no format details (bits, channels etc) |
336 propertySize = sizeof(ao->outputStreamBasicDescription); | 336 propertySize = sizeof(ao->outputStreamBasicDescription); |
337 memset(&ao->outputStreamBasicDescription,0,propertySize); | 337 memset(&ao->outputStreamBasicDescription,0,propertySize); |
338 ao->outputStreamBasicDescription.mSampleRate=rate; | 338 ao->outputStreamBasicDescription.mSampleRate=rate; |
339 ao->outputStreamBasicDescription.mFormatID=kAudioFormatLinearPCM; | 339 ao->outputStreamBasicDescription.mFormatID=kAudioFormatLinearPCM; |
340 ao->outputStreamBasicDescription.mChannelsPerFrame=channels; | |
340 // status = AudioDeviceGetProperty(ao->outputDeviceID, 0, false, kAudioStreamPropertyPhysicalFormatMatch, &propertySize, &ao->outputStreamBasicDescription); | 341 // status = AudioDeviceGetProperty(ao->outputDeviceID, 0, false, kAudioStreamPropertyPhysicalFormatMatch, &propertySize, &ao->outputStreamBasicDescription); |
341 status = AudioDeviceGetProperty(ao->outputDeviceID, 0, false, kAudioDevicePropertyStreamFormatMatch, &propertySize, &ao->outputStreamBasicDescription); | 342 status = AudioDeviceGetProperty(ao->outputDeviceID, 0, false, kAudioDevicePropertyStreamFormatMatch, &propertySize, &ao->outputStreamBasicDescription); |
342 if (status || ao->outputStreamBasicDescription.mFormatID!=kAudioFormatLinearPCM) { | 343 if (status || ao->outputStreamBasicDescription.mFormatID!=kAudioFormatLinearPCM) { |
343 ao_msg(MSGT_AO,MSGL_V, "AudioDeviceGetProperty returned 0x%X when getting kAudioDevicePropertyStreamFormatMatch\n", (int)status); | 344 ao_msg(MSGT_AO,MSGL_V, "AudioDeviceGetProperty returned 0x%X when getting kAudioDevicePropertyStreamFormatMatch\n", (int)status); |
344 // failed again. (error or bad type) | 345 // failed again. (error or bad type) |