Mercurial > mplayer.hg
comparison libao2/ao_coreaudio.c @ 31891:4f17ff5b3cbc
Fix a bunch of grammar and spelling errors in mp_msg calls.
author | diego |
---|---|
date | Tue, 17 Aug 2010 22:39:24 +0000 |
parents | 5fd00f0e4d1c |
children | d9c8f66f77e1 |
comparison
equal
deleted
inserted
replaced
31890:d335ceb31507 | 31891:4f17ff5b3cbc |
---|---|
462 if (AF_FORMAT_IS_AC3(format)) { | 462 if (AF_FORMAT_IS_AC3(format)) { |
463 if (AudioDeviceSupportsDigital(devid_def)) | 463 if (AudioDeviceSupportsDigital(devid_def)) |
464 { | 464 { |
465 ao->b_supports_digital = 1; | 465 ao->b_supports_digital = 1; |
466 } | 466 } |
467 ao_msg(MSGT_AO,MSGL_V, "probe default audio output device whether support digital s/pdif output:%d\n", ao->b_supports_digital ); | 467 ao_msg(MSGT_AO, MSGL_V, |
468 "probe default audio output device about support for digital s/pdif output: %d\n", | |
469 ao->b_supports_digital ); | |
468 } | 470 } |
469 | 471 |
470 free(psz_name); | 472 free(psz_name); |
471 | 473 |
472 // Save selected device id | 474 // Save selected device id |
685 i_param_size = GetGlobalAudioPropertyArray(p_streams[i], | 687 i_param_size = GetGlobalAudioPropertyArray(p_streams[i], |
686 kAudioStreamPropertyPhysicalFormats, | 688 kAudioStreamPropertyPhysicalFormats, |
687 (void **)&p_format_list); | 689 (void **)&p_format_list); |
688 | 690 |
689 if (!i_param_size) { | 691 if (!i_param_size) { |
690 ao_msg(MSGT_AO, MSGL_WARN, "could not get number of streamformats.\n"); | 692 ao_msg(MSGT_AO, MSGL_WARN, |
693 "Could not get number of stream formats.\n"); | |
691 continue; | 694 continue; |
692 } | 695 } |
693 | 696 |
694 i_formats = i_param_size / sizeof(AudioStreamBasicDescription); | 697 i_formats = i_param_size / sizeof(AudioStreamBasicDescription); |
695 | 698 |
720 err = GetAudioProperty(ao->i_stream_id, | 723 err = GetAudioProperty(ao->i_stream_id, |
721 kAudioStreamPropertyPhysicalFormat, | 724 kAudioStreamPropertyPhysicalFormat, |
722 sizeof(ao->sfmt_revert), &ao->sfmt_revert); | 725 sizeof(ao->sfmt_revert), &ao->sfmt_revert); |
723 if (err != noErr) | 726 if (err != noErr) |
724 { | 727 { |
725 ao_msg(MSGT_AO, MSGL_WARN, "could not retrieve the original streamformat: [%4.4s]\n", (char *)&err); | 728 ao_msg(MSGT_AO, MSGL_WARN, |
729 "Could not retrieve the original stream format: [%4.4s]\n", | |
730 (char *)&err); | |
726 if (p_format_list) free(p_format_list); | 731 if (p_format_list) free(p_format_list); |
727 continue; | 732 continue; |
728 } | 733 } |
729 ao->b_revert = 1; | 734 ao->b_revert = 1; |
730 } | 735 } |
754 } | 759 } |
755 if (p_streams) free(p_streams); | 760 if (p_streams) free(p_streams); |
756 | 761 |
757 if (ao->i_stream_index < 0) | 762 if (ao->i_stream_index < 0) |
758 { | 763 { |
759 ao_msg(MSGT_AO, MSGL_WARN, "can not find any digital output stream format when OpenSPDIF().\n"); | 764 ao_msg(MSGT_AO, MSGL_WARN, |
765 "Cannot find any digital output stream format when OpenSPDIF().\n"); | |
760 goto err_out; | 766 goto err_out; |
761 } | 767 } |
762 | 768 |
763 print_format(MSGL_V, "original stream format:", &ao->sfmt_revert); | 769 print_format(MSGL_V, "original stream format:", &ao->sfmt_revert); |
764 | 770 |
782 #if HAVE_BIGENDIAN | 788 #if HAVE_BIGENDIAN |
783 if (!(ao->stream_format.mFormatFlags & kAudioFormatFlagIsBigEndian)) | 789 if (!(ao->stream_format.mFormatFlags & kAudioFormatFlagIsBigEndian)) |
784 #else | 790 #else |
785 if (ao->stream_format.mFormatFlags & kAudioFormatFlagIsBigEndian) | 791 if (ao->stream_format.mFormatFlags & kAudioFormatFlagIsBigEndian) |
786 #endif | 792 #endif |
787 ao_msg(MSGT_AO, MSGL_WARN, "output stream has a no-native byte-order, digital output may failed.\n"); | 793 ao_msg(MSGT_AO, MSGL_WARN, |
794 "Output stream has non-native byte order, digital output may fail.\n"); | |
788 | 795 |
789 /* For ac3/dts, just use packet size 6144 bytes as chunk size. */ | 796 /* For ac3/dts, just use packet size 6144 bytes as chunk size. */ |
790 ao->chunk_size = ao->stream_format.mBytesPerPacket; | 797 ao->chunk_size = ao->stream_format.mBytesPerPacket; |
791 | 798 |
792 ao_data.samplerate = ao->stream_format.mSampleRate; | 799 ao_data.samplerate = ao->stream_format.mSampleRate; |
894 i_param_size = GetGlobalAudioPropertyArray(i_stream_id, | 901 i_param_size = GetGlobalAudioPropertyArray(i_stream_id, |
895 kAudioStreamPropertyPhysicalFormats, | 902 kAudioStreamPropertyPhysicalFormats, |
896 (void **)&p_format_list); | 903 (void **)&p_format_list); |
897 | 904 |
898 if (!i_param_size) { | 905 if (!i_param_size) { |
899 ao_msg(MSGT_AO, MSGL_WARN, "could not get number of streamformats.\n"); | 906 ao_msg(MSGT_AO, MSGL_WARN, "Could not get number of stream formats.\n"); |
900 return CONTROL_FALSE; | 907 return CONTROL_FALSE; |
901 } | 908 } |
902 | 909 |
903 i_formats = i_param_size / sizeof(AudioStreamBasicDescription); | 910 i_formats = i_param_size / sizeof(AudioStreamBasicDescription); |
904 | 911 |
1031 { | 1038 { |
1032 ao->b_stream_format_changed = 0; | 1039 ao->b_stream_format_changed = 0; |
1033 b_digital = AudioStreamSupportsDigital(ao->i_stream_id); | 1040 b_digital = AudioStreamSupportsDigital(ao->i_stream_id); |
1034 if (b_digital) | 1041 if (b_digital) |
1035 { | 1042 { |
1036 /* Current stream support digital format output, let's set it. */ | 1043 /* Current stream supports digital format output, let's set it. */ |
1037 ao_msg(MSGT_AO, MSGL_V, "detected current stream support digital, try to restore digital output...\n"); | 1044 ao_msg(MSGT_AO, MSGL_V, |
1045 "Detected current stream supports digital, try to restore digital output...\n"); | |
1038 | 1046 |
1039 if (!AudioStreamChangeFormat(ao->i_stream_id, ao->stream_format)) | 1047 if (!AudioStreamChangeFormat(ao->i_stream_id, ao->stream_format)) |
1040 { | 1048 { |
1041 ao_msg(MSGT_AO, MSGL_WARN, "restore digital output failed.\n"); | 1049 ao_msg(MSGT_AO, MSGL_WARN, "Restoring digital output failed.\n"); |
1042 } | 1050 } |
1043 else | 1051 else |
1044 { | 1052 { |
1045 ao_msg(MSGT_AO, MSGL_WARN, "restore digital output succeed.\n"); | 1053 ao_msg(MSGT_AO, MSGL_WARN, "Restoring digital output succeeded.\n"); |
1046 reset(); | 1054 reset(); |
1047 } | 1055 } |
1048 } | 1056 } |
1049 else | 1057 else |
1050 ao_msg(MSGT_AO, MSGL_V, "detected current stream do not support digital.\n"); | 1058 ao_msg(MSGT_AO, MSGL_V, "Detected current stream does not support digital.\n"); |
1051 } | 1059 } |
1052 | 1060 |
1053 wrote=write_buffer(output_samples, num_bytes); | 1061 wrote=write_buffer(output_samples, num_bytes); |
1054 audio_resume(); | 1062 audio_resume(); |
1055 | 1063 |