Re: [hatari-devel] SDL1 vs. SDL2 sound pausing |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] SDL1 vs. SDL2 sound pausing
- From: David Savinkoff <dsavnkff@xxxxxxxxx>
- Date: Sat, 10 Sep 2016 14:19:01 -0600 (MDT)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telus.net; s=neo; t=1473538742; bh=0iNgnT34is+w9Cea+H81BlglSvKgcAuBpvbHzEqsB98=; h=Date:From:To:In-Reply-To:Subject; b=3/nVQya5lPDOeiMZ5YPmKUvLhC3wYpWp1YBTeZoPGZwVNZCiN5DfS0npc0zVW6rhU yoNKEasP6WiCHOGszmAl5cJOZdr8h7JR2tHvGCgicPTjMVCoh1fIdNLF4klPsgNyZn LvuzpdXT6d96Ko0xOxei4c6EYOb8jgb3CAjPF19xiYUzSRJjGyBLN6iIff7aZInvJQ dJe57WCpkeC7xI9zZTnaaBuBqGd2y9aMgztSH7jHjdQiOuKG2UVsg8tqa54UQiTC8r vgh9/ArhYNipvqpWVUlgcxwCZuWLwqIHN+7BJiDC63QINDQGnvoLU+PMwMvXuGUO0V dlwbqjlQ0mEpg==
- Thread-index: VKRWmIHiCjaV01hEGmP5B0/gzmlHJA==
- Thread-topic: SDL1 vs. SDL2 sound pausing
----- Nicolas Pomarède wrote:
> Le 10/09/2016 à 21:20, David Savinkoff a écrit :
>
> > Hi,
> >
> > Looking at audio.c, one can see that *pBuffer++ is not touched
> > when nGeneratedSamples is == 0.
> > This leaves old data to be repeated. Zeroing the data leaves
> > silence to be repeated.
> > However, repeated old data is better than chunks of silence
> > when Not paused. (note: repeated data is milliseconds long)
> >
> > I think Thomas' patch is correct with a small modification:
> > + else if (nGeneratedSamples == 0 && emulator_paused)
> >
>
> Hi
>
> I think it's subjective to say that repeated old data is better than 0
> bytes.
> If the sound is a simple YM2149 note (eg keyboard sound), repeating old
> data might be good and less noticable.
>
> But when playing more complex sound (soundtracker module, wav file, ...)
> I think that the repeated bytes will be hearable too. Instead of a
> "click" you will heard some off-key sound due to repeat, not sure it's
> better and in all cases that's a problem we can't really fix on the
> user's computer which is certainly not powerful enough for the emulation.
>
I think we should not make big changes because Hatari has worked
well for a long time. Note that this problem is an Apple(tm) glitch.
I think that adding an improvement to the old code is better than
staring over with a new concept.