Skip to content

Commit

Permalink
Merged revision(s) 21753 from trunk/OpenMPT:
Browse files Browse the repository at this point in the history
[Ref] openmpt123: Cleanup libsndfile text encoding.
........


git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.31@21754 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
manxorist committed Sep 26, 2024
1 parent 484ce62 commit e414805
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions openmpt123/openmpt123_sndfile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class sndfile_stream_raii : public file_audio_stream_base {
case match_recurse:
break;
case match_exact:
if ( mpt::transcode<std::string>( mpt::common_encoding::utf8, extension ) == format_info.extension ) {
if ( mpt::transcode<std::string>( sndfile_encoding, extension ) == format_info.extension ) {
if ( flags.use_float && ( subformat_info.format == SF_FORMAT_FLOAT ) ) {
return matched_result( format, format_info, subformat_info, match_mode );
} else if ( !flags.use_float && ( subformat_info.format == SF_FORMAT_PCM_16 ) ) {
Expand All @@ -126,7 +126,7 @@ class sndfile_stream_raii : public file_audio_stream_base {
}
break;
case match_better:
if ( mpt::transcode<std::string>( mpt::common_encoding::utf8, extension ) == format_info.extension ) {
if ( mpt::transcode<std::string>( sndfile_encoding, extension ) == format_info.extension ) {
if ( flags.use_float && ( subformat_info.format == SF_FORMAT_FLOAT || subformat_info.format == SF_FORMAT_DOUBLE ) ) {
return matched_result( format, format_info, subformat_info, match_mode );
} else if ( !flags.use_float && ( subformat_info.format & ( subformat_info.format == SF_FORMAT_PCM_16 || subformat_info.format == SF_FORMAT_PCM_24 || subformat_info.format == SF_FORMAT_PCM_32 ) ) ) {
Expand All @@ -135,7 +135,7 @@ class sndfile_stream_raii : public file_audio_stream_base {
}
break;
case match_any:
if ( mpt::transcode<std::string>( mpt::common_encoding::utf8, extension ) == format_info.extension ) {
if ( mpt::transcode<std::string>( sndfile_encoding, extension ) == format_info.extension ) {
return matched_result( format, format_info, subformat_info, match_mode );
}
break;
Expand Down

0 comments on commit e414805

Please sign in to comment.