96KHz sound

Found a bug? Please report it, but remember to follow the bug reporting guidelines.
Missing a sane feature? Let us know!
But please do NOT request ports to other systems.

Moderator: ZSNES Mods

Post Reply
Poobah
Lurker
Posts: 164
Joined: Sun Sep 25, 2005 12:59 pm

96KHz sound

Post by Poobah »

Hello,

Could support for 96KHz sound be added to ZSNES?
kode54
Zealot
Posts: 1140
Joined: Wed Jul 28, 2004 3:31 am
Contact:

Post by kode54 »

Since most sound effects are upsampled, 96KHz won't magically add any frequency information that was otherwise lost with the hardware sample rate of 32KHz.

However, it shouldn't be difficult to add 96KHz support to the source code. Next, you'll be wanting 24-bit mixing to go with that, right?
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

I'm pretty sure I know why this is asked, but even before you make any replies to that, please search the board as you will find the following:

1) Ridicule for asking.

2) Flaming for asking.

3) Only limited to those Creative sound cards that only happen to be the special kid in class.

4) Complete idiocy from those that ask.

With that said, you are free to implement it yourself. 48KHz was only added to address a subset of people who had issues with sound... 96KHz only applies to even a smaller subset of people that don't have issues at all, but thought it would magically improve things.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
ZH/Franky

Post by ZH/Franky »

96KHz sound
For SNES-based sound, what's the point? Chances are your sound card will down-sample it anyway. Besides, SNES audio output is 32KHz; as dl2 put it, the 44/48KHz options are for people with soundcards that have problems with 32KHz (which makes me laugh, given how these soundcards are probably more modern than the sound chip the SNES has, but maybe that's just me, meh)

The frequency options for lower than 32KHz? I honestly don't see the point in those, I guess it's for people with shitty soundcards though (that said, I do often set sound in zsnes to 16KHz, for when I use the NTSC filter; I make the image so crap that it looks like it's on an old TV running via RF; in addition, I disable stereo sound. Because I like nostalgicly crap video and audio output).
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

ZH wrote:(which makes me laugh, given how these soundcards are probably more modern than the sound chip the SNES has, but maybe that's just me, meh)
The problem is crappy upsampling.

Example: a 'recent' card's native sampling rate is 44100Hz. You feed it 32000-sampled data, it turns it into 44100 with a crappy algo and quality severely decreases. If the resampling is done program-side (with a better algo, at the expense of cpu power), the quality will be kept.
Typically any fractional resampling could sound like shit on a cheap soundcard, like 32000->44100 (1.38~) or ->48000 (1.5).
However... 32000 -> 96000 is so trivial I don't think it would demand anything special, since linear interpolation would result in the very same result you'd get on a 32000 native card, unless i'm mistaken somewhere.
The frequency options for lower than 32KHz? I honestly don't see the point in those, I guess it's for people with shitty soundcards though (that said, I do often set sound in zsnes to 16KHz, for when I use the NTSC filter; I make the image so crap that it looks like it's on an old TV running via RF; in addition, I disable stereo sound. Because I like nostalgicly crap video and audio output).
They're from a time when computers couldn't pull zsnes emu fast enough. We also had 8 bit graphic modes, and still have the option for mono and even spc disabling. All for the sake of speedup.

However, low sampling rates shouldn't do anything about nostalgy, since even the worst connection between a realsnes and a crappy tv would give you 32000hz sampling rate sounds.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
byuu

Post by byuu »

You feed it 32000-sampled data, it turns it into 44100 with a crappy algo and quality severely decreases. If the resampling is done program-side (with a better algo, at the expense of cpu power), the quality will be kept.
Now I know I have bad ears, but can a perceptible difference really occur from 32khz->44.1khz resampling? I've tried everything from linear to 4-tap hermite to SRC and noticed no difference in sound.
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

I can't really say, but I'm gonna assume there might, for argument's sake.

A nearest neighbour algo would probably sound really crappy.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
badinsults
"Your thread will be crushed."
Posts: 1236
Joined: Wed Jul 28, 2004 1:49 am
Location: Not in Winnipeg
Contact:

Post by badinsults »

byuu wrote:
You feed it 32000-sampled data, it turns it into 44100 with a crappy algo and quality severely decreases. If the resampling is done program-side (with a better algo, at the expense of cpu power), the quality will be kept.
Now I know I have bad ears, but can a perceptible difference really occur from 32khz->44.1khz resampling? I've tried everything from linear to 4-tap hermite to SRC and noticed no difference in sound.
I don't know how my sound card upsamples, but it sounds like crap if I use the 32 khz setting rather than the 48 khz sampling. They must be using some bizarre algorithm to do it, as I can't see so much horrid noise being introduced by linear interpolation.
<pagefault> i'd break up with my wife if she said FF8 was awesome
ZH/Franky

Post by ZH/Franky »

grinvader wrote:
ZH wrote:(which makes me laugh, given how these soundcards are probably more modern than the sound chip the SNES has, but maybe that's just me, meh)
The problem is crappy upsampling.

Example: a 'recent' card's native sampling rate is 44100Hz. You feed it 32000-sampled data, it turns it into 44100 with a crappy algo and quality severely decreases. If the resampling is done program-side (with a better algo, at the expense of cpu power), the quality will be kept.
Typically any fractional resampling could sound like shit on a cheap soundcard, like 32000->44100 (1.38~) or ->48000 (1.5).
However... 32000 -> 96000 is so trivial I don't think it would demand anything special, since linear interpolation would result in the very same result you'd get on a 32000 native card, unless i'm mistaken somewhere.
You know, that actually explains a lot. So I understand that some cards will upsample poorly (thus it makes better sence to do it in software at the expense of speed, to give the sound-card something it can work with immediatly, and also maintain quality), but that ultimately depends on the card in question, right? It probably depends on drivers too (on Linux/BSD, I can't get good sound in zsnes when setting to 32KHz, but get good sound when setting it to 48KHz, whereas on Windows I get good sound on 32KHz (and any other setting)).
The frequency options for lower than 32KHz? I honestly don't see the point in those, I guess it's for people with shitty soundcards though (that said, I do often set sound in zsnes to 16KHz, for when I use the NTSC filter; I make the image so crap that it looks like it's on an old TV running via RF; in addition, I disable stereo sound. Because I like nostalgicly crap video and audio output).
They're from a time when computers couldn't pull zsnes emu fast enough. We also had 8 bit graphic modes, and still have the option for mono and even spc disabling. All for the sake of speedup.
Hmm, that seems obvious, well, I guess I just didn't think about that (when was the first release of zsnes anyway? something like 1997 right? I can see plain as day why this would have been useful then).
However, low sampling rates shouldn't do anything about nostalgy, since even the worst connection between a realsnes and a crappy tv would give you 32000hz sampling rate sounds.
Hmm. Well, I still like having shitty sound. It sounds great.
CSMR
New Member
Posts: 7
Joined: Fri Apr 10, 2009 8:01 pm

Post by CSMR »

This was a problem with earlier Microsoft operating systems where frequency the application output determined the frequency of the stream the sound card driver received. Resampling was then done by the driver or the audio chip and could be poor e.g. Creative. Or non-existent in which case you got an error.
This is corrected in Vista where you set the frequency the sound card/driver operates at in the control panel and everything is resampled by the OS to that frequency. You can't choose the algorithm but apparently it's a decent one, and calculations are done more accurately than on older microsoft OSes. (32 rather than 16bit.)
(So on Vista you should obviously choose 32khz as that's the native frequency.)
pagefault
ZSNES Developer
ZSNES Developer
Posts: 812
Joined: Tue Aug 17, 2004 5:24 am
Location: In your garden

Post by pagefault »

I didn't take the time to read this thread but from the title of it I say no.
Watering ur plants.
I.S.T.
Zealot
Posts: 1325
Joined: Tue Nov 27, 2007 7:03 am

Post by I.S.T. »

byuu wrote:
You feed it 32000-sampled data, it turns it into 44100 with a crappy algo and quality severely decreases. If the resampling is done program-side (with a better algo, at the expense of cpu power), the quality will be kept.
Now I know I have bad ears, but can a perceptible difference really occur from 32khz->44.1khz resampling? I've tried everything from linear to 4-tap hermite to SRC and noticed no difference in sound.
You probably have shit speakers. 90% of people do.
Post Reply