When I tested v14 of the patch yesterday – using the svn revision it was published against (r4294), I created a one-track cue file with one Opus track and used SJGPlay to play it. Interestingly, the player would show 2 tracks in the v14 version, with track 2 producing errors when trying to play it. The same does not happen in v13 against its respective svn revision, and also not in dosbox-staging. They show only one track, as I would expect.
This question is regarding emulation of Roland MT-32 and CM-32L on DOSBox-ECE.
Researching the web, I've found that the sampling rate of a Roland MT-32 is 32000 Hz. But DOSBox-ECE's config.conf brings:
mt32.rate = 44100
Can this mismatch of sampling rates cause inaccuracies in the sound being played?
I found this an interesting questions as well, so I investigated myself.
The output of the synth is internally set to 32000hz. It is then resampled if desired. So any sound artifacts would be minimal to none depending on the rate chosen. You should probably choose a rate supported by your sound card, which would have to do the conversion anyway.
DosboxECE uses the mt32emu library for MT-32 emulation. That library is called from within- midi_mt32.cpp
174 int sampleRate = section->Get_int("mt32.rate"); 275 service->setStereoOutputSampleRate(sampleRate);
Then within mt32emu interface, the cpp_interface.h calls the-
1c_interface.h 2/** 3 * Allows to convert the synthesiser output to any desired sample rate. The samplerate conversion 4 * processes the completely mixed stereo output signal as it passes the analogue circuit emulation, 5 * so emulating the synthesiser output signal passing further through an ADC. When the samplerate 6 * argument is set to 0, the default output sample rate is used which depends on the current 7 * mode of analog circuitry emulation. See mt32emu_analog_output_mode. 8 * This function doesn't immediately change the state of already opened synth. 9 * Newly set value will take effect upon next call of mt32emu_open_synth(). 10 */ 11MT32EMU_EXPORT void mt32emu_set_stereo_output_samplerate(mt32emu_context context, const double samplerate);
...that code calls the SampleRateConverter class which eventually calls this- SampleRateConverter.h
1// Fills the provided output buffer with the results of the sample rate conversion. 2// The input samples are automatically retrieved from the synth as necessary. 3void getOutputSamples(float *buffer, unsigned int length); 4 5// Returns the number of samples produced at the internal synth sample rate (32000 Hz) 6// that correspond to the number of samples at the target sample rate. 7// Intended to facilitate audio time synchronisation. 8double convertOutputToSynthTimestamp(double outputTimestamp) const;