[hatari-devel] STE sound breakage with lower sound frequencies
David Savinkoff
dsavnkff at telus.net
Sun Feb 13 23:31:14 CET 2011
Hi,
Referring to audio.c:
void Audio_SetOutputAudioFreq(int nNewFrequency)
{
/* Do not reset sound system if nothing has changed! */
if (nNewFrequency != nAudioFrequency)
{
/* Set new frequency */
nAudioFrequency = nNewFrequency;
/* Re-open SDL audio interface if necessary: */
if (bSoundWorking)
{
Audio_UnInit();
Audio_Init();
DmaSnd_Init_Bass_and_Treble_Tables();
}
}
}
It may be better to initialize
DmaSnd_Init_Bass_and_Treble_Tables();
somewhere else because the only function to call
Audio_SetOutputAudioFreq(int nNewFrequency)
is in configuration.c which calls with
Audio_SetOutputAudioFreq(ConfigureParams.Sound.nPlaybackFreq);
THIS is the bad initialization
David
************************
On Feb 13, 2011, Nicolas Pomarède <npomarede at corp.free.fr> wrote:
Le 13/02/2011 22:57, David Savinkoff a écrit :
> Hi,
>
> Referring to dmaSnd.c:
>
> void DmaSnd_Reset(bool bCold)
> {
> nDmaSoundControl = 0;
>
> if (bCold)
> {
> dma.soundMode = 3;
> microwire.masterVolume = 7;
> microwire.leftVolume = 655;
> microwire.rightVolume = 655;
> microwire.mixing = 0;
> microwire.bass = 6;
> microwire.treble = 6;
> }
>
> /* Initialise microwire LMC1992 IIR filter parameters */
> DmaSnd_Init_Bass_and_Treble_Tables();
>
> microwire.mwTransferSteps = 0;
> }
>
> DmaSnd_Init_Bass_and_Treble_Tables(); may need to be called
> (for resetting purposes) in a more fundamental place instead of
> DmaSnd_Reset(bool bCold);
>
> This would explain wacky initialization at less than 22050KHz.
>
> David
Yes, I was thinking about that too, it would explain why we can start
Hatari at 44.1 and switch to 16 kHz and still have sound (but if we
start directly at 16 kHz, we don't have sound) ; something is not
correctly initialized.
Nicolas
More information about the hatari-devel
mailing list