decoder/sidplay: play monaural SID tunes in mono
This commit is contained in:
parent
dadb6747ad
commit
4e94516912
1
NEWS
1
NEWS
|
@ -35,6 +35,7 @@ ver 0.16 (20??/??/??)
|
||||||
- sidplay: support sub-tunes
|
- sidplay: support sub-tunes
|
||||||
- sidplay: implemented songlength database
|
- sidplay: implemented songlength database
|
||||||
- sidplay: support seeking
|
- sidplay: support seeking
|
||||||
|
- sidplay: play monaural SID tunes in mono
|
||||||
- wavpack: activate 32 bit support
|
- wavpack: activate 32 bit support
|
||||||
- wavpack: allow more than 2 channels
|
- wavpack: allow more than 2 channels
|
||||||
- mp4ff: rename plugin "mp4" to "mp4ff"
|
- mp4ff: rename plugin "mp4" to "mp4ff"
|
||||||
|
|
|
@ -201,6 +201,7 @@ static void
|
||||||
sidplay_file_decode(struct decoder *decoder, const char *path_fs)
|
sidplay_file_decode(struct decoder *decoder, const char *path_fs)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
int channels;
|
||||||
|
|
||||||
/* load the tune */
|
/* load the tune */
|
||||||
|
|
||||||
|
@ -256,7 +257,7 @@ sidplay_file_decode(struct decoder *decoder, const char *path_fs)
|
||||||
config.clockSpeed = SID2_CLOCK_CORRECT;
|
config.clockSpeed = SID2_CLOCK_CORRECT;
|
||||||
config.frequency = 48000;
|
config.frequency = 48000;
|
||||||
config.optimisation = SID2_DEFAULT_OPTIMISATION;
|
config.optimisation = SID2_DEFAULT_OPTIMISATION;
|
||||||
config.playback = sid2_stereo;
|
|
||||||
config.precision = 16;
|
config.precision = 16;
|
||||||
config.sidDefault = SID2_MOS6581;
|
config.sidDefault = SID2_MOS6581;
|
||||||
config.sidEmulation = &builder;
|
config.sidEmulation = &builder;
|
||||||
|
@ -267,6 +268,13 @@ sidplay_file_decode(struct decoder *decoder, const char *path_fs)
|
||||||
#else
|
#else
|
||||||
config.sampleFormat = SID2_BIG_SIGNED;
|
config.sampleFormat = SID2_BIG_SIGNED;
|
||||||
#endif
|
#endif
|
||||||
|
if (tune.isStereo()) {
|
||||||
|
config.playback = sid2_stereo;
|
||||||
|
channels = 2;
|
||||||
|
} else {
|
||||||
|
config.playback = sid2_mono;
|
||||||
|
channels = 1;
|
||||||
|
}
|
||||||
|
|
||||||
iret = player.config(config);
|
iret = player.config(config);
|
||||||
if (iret != 0) {
|
if (iret != 0) {
|
||||||
|
@ -277,7 +285,7 @@ sidplay_file_decode(struct decoder *decoder, const char *path_fs)
|
||||||
/* initialize the MPD decoder */
|
/* initialize the MPD decoder */
|
||||||
|
|
||||||
struct audio_format audio_format;
|
struct audio_format audio_format;
|
||||||
audio_format_init(&audio_format, 48000, SAMPLE_FORMAT_S16, 2);
|
audio_format_init(&audio_format, 48000, SAMPLE_FORMAT_S16, channels);
|
||||||
assert(audio_format_valid(&audio_format));
|
assert(audio_format_valid(&audio_format));
|
||||||
|
|
||||||
decoder_initialized(decoder, &audio_format, true, (float)song_len);
|
decoder_initialized(decoder, &audio_format, true, (float)song_len);
|
||||||
|
|
Loading…
Reference in New Issue