• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Support v
« Previous 1 ... 607 608 609 610 611 ... 1198 Next »

How/why does Dolphin generate sound frequencies above 17 KHz?
View New Posts | View Today's Posts

Pages (4): 1 2 3 4 Next »
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
How/why does Dolphin generate sound frequencies above 17 KHz?
11-08-2013, 08:23 PM
#1
nothingtosay Offline
Junior Member
**
Posts: 21
Threads: 1
Joined: Nov 2013
Hello all. I'm curious about this and hope someone can explain to me why it works this way. This is a comparison of the frequency spectograms of Kirby Air Ride's menu music. The top is the original HPS format file from the game, which is at a 32 kHz sampling rate (I've upsampled it with SoX to 48 kHz for a comparison of the same scale), and the bottom is a recording of the same from Dolphin 4.0-330 (but this goes back to at least 3.5) using DSP LLE and XAudio2 that's been boosted by 2.04 dB to match the original's volume. As developers surely know, a 32 kHz file can't contain sounds greater than 16 KHz in frequency, but Dolphin outputs up to 24 kHz.


[Image: b550.png]

It appears to be generating a mirror image of the lower frequencies starting at 16 KHz. Dolphin does the same with Wii games too, but I know a real Wii doesn't do this. In fact, a real Wii appears to output at 32 kHz even when the source files on the disc are 48 kHz (tested with Shiren the Wanderer). I don't know how or why this can even happen. Can anyone please explain it to me?
Find
Reply
11-09-2013, 12:10 AM
#2
haddockd Offline
Dolphin Addict
*****
Posts: 838
Threads: 31
Joined: Jun 2011
While I do not know the answer the the question I wonder if something like this can cause the crackling/static some folks say they hear (including myself) in certain places in games.
i5-8600K @ 4.5 GHz
GeForce GTX 1080 SC2
ASRock Z370 Taichi LGA 1151
CORSAIR Vengeance LPX 16GB 2400 DDR4
SAMSUNG 970 EVO M.2 500GB PCIe SSD
Indigo Xtreme TIM
Phanteks Pro ES614P Black Steel Case
EVGA SuperNOVA 750W PSU
Windows 10 64-bit
Find
Reply
11-09-2013, 04:06 AM
#3
delroth Offline
Making the world a better place through reverse engineered DSP firmwares
**********
Developers (Some Administrators and Super Moderators)
Posts: 1,354
Threads: 63
Joined: Aug 2011
DSPHLE on AX UCode games should only be outputting 32KHz as well. We've known for a while that there is something fishy with Dolphin's audio mixer which might be happening when resampling 32->48KHz, this might be yet another sign of it.

FWIW, does anyone know why Dolphin even outputs sound at 48KHz? DSP mixing is done at 32KHz on GameCube and Wii, maybe DTK audio can be 48KHz? Not sure.
Pierre "delroth" Bourdon - @delroth_ - Blog

<@neobrain> that looks sophisticated enough to not be a totally dumb thing to do
Website Find
Reply
11-09-2013, 07:32 AM (This post was last modified: 11-09-2013, 07:35 AM by nothingtosay.)
#4
nothingtosay Offline
Junior Member
**
Posts: 21
Threads: 1
Joined: Nov 2013
3.5-246 is the version that did away with the 32 kHz sampling rate, saying, "Removed the Sample Rate setting. It is now hardcoded to 48000hz (accurate audio timing)."

I can confirm that Mario Party 4, a game I read for sure uses AX UCode and which uses mostly sequenced music rather than streamed, still synthesizes frequencies above 16 kHz, whether HLE or LLE, on both sequenced and streamed music. The streamed music is at 32 kHz as well.
Find
Reply
11-09-2013, 11:53 AM
#5
delroth Offline
Making the world a better place through reverse engineered DSP firmwares
**********
Developers (Some Administrators and Super Moderators)
Posts: 1,354
Threads: 63
Joined: Aug 2011
Do you have some programming skills? If so, you should try to patch Dolphin to dump audio before the AudioCommon Mixer does stuff to it. If not, hope that a developer will do that so that we can have more info on why Dolphin generates these frequencies. My guess: resampling done in the AudioCommon mixer introduces these problems (and we already know it's very broken).
Pierre "delroth" Bourdon - @delroth_ - Blog

<@neobrain> that looks sophisticated enough to not be a totally dumb thing to do
Website Find
Reply
11-09-2013, 12:24 PM
#6
haddockd Offline
Dolphin Addict
*****
Posts: 838
Threads: 31
Joined: Jun 2011
GOD I would love to do just that but I suck at C++. C# all day long but C++ makes my head hurt. </shameful rant>
i5-8600K @ 4.5 GHz
GeForce GTX 1080 SC2
ASRock Z370 Taichi LGA 1151
CORSAIR Vengeance LPX 16GB 2400 DDR4
SAMSUNG 970 EVO M.2 500GB PCIe SSD
Indigo Xtreme TIM
Phanteks Pro ES614P Black Steel Case
EVGA SuperNOVA 750W PSU
Windows 10 64-bit
Find
Reply
11-09-2013, 05:33 PM
#7
tueidj Offline
Senior Member
****
Posts: 552
Threads: 0
Joined: Apr 2013
(11-09-2013, 04:06 AM)delroth Wrote: FWIW, does anyone know why Dolphin even outputs sound at 48KHz? DSP mixing is done at 32KHz on GameCube and Wii, maybe DTK audio can be 48KHz? Not sure.
DSP output is 32KHz for nearly all retail/SDK apps, a couple of games (Aggressive Inline, BMX XXX) and some homebrew uses 48KHz. DTK audio is always 48KHz (48043 according to documentation), the hardware *may* support 32KHz but I haven't ever seen it used.
However the DAC is fixed at 48KHz, with a hardware resampler before it controlled by bit 6 (DSP) and bit 1 (DTK) of the AI control register. So I think before anyone jumps to any conclusions it would be best to record the output from the real hardware and use that for comparison rather than "pristine" audio from game files.
Find
Reply
11-09-2013, 05:41 PM (This post was last modified: 11-09-2013, 05:42 PM by delroth.)
#8
delroth Offline
Making the world a better place through reverse engineered DSP firmwares
**********
Developers (Some Administrators and Super Moderators)
Posts: 1,354
Threads: 63
Joined: Aug 2011
There is only one possible explanation: #badbios.
Pierre "delroth" Bourdon - @delroth_ - Blog

<@neobrain> that looks sophisticated enough to not be a totally dumb thing to do
Website Find
Reply
11-09-2013, 08:02 PM (This post was last modified: 11-09-2013, 08:12 PM by nothingtosay.)
#9
nothingtosay Offline
Junior Member
**
Posts: 21
Threads: 1
Joined: Nov 2013
@Delroth: No, I'm afraid I don't have any programming skills. I'm much more an audio guy than a computer guy.

@tueidj: I assume what you're saying applies equally to both Gamecube and Wii. If that's the case, I did try recording from my Wii with Shiren the Wanderer, a game that uses 48 kHz SAD files for its BGM. The real Wii produces frequencies no higher than 18 kHz, the upper two kHz being analog distortion I assume. Anything higher than that is just random noise (which is still pretty visible on the spectogram; the Wii, or my Wii at least, has a noise floor of about -60 dB and then I had to boost the recording by almost 12 dB to get it to the same volume as the original file, so that's what all the blue fuzziness is above the music):

(Big spectogram image)
Spoiler: (Show Spoiler)
[Image: 4n3s.png]

The real Wii recording and the original file sound minimally different, but the Dolphin LLE recompiler recording has a notable treble reduction. I can post my three files if anyone is interested. If you know what the rip from the disc sounds like, I've found this treble loss with Dolphin is pretty immediately noticeable on Kirby Air Ride especially. I can record with another game if you want, but I've seen the same thing happens with the Wii system menu music: clearly ~32 kHz on the real Wii, sound up to the Nyquist frequency with Dolphin.

Also, like haddockd mentioned before, I too get occasional faint pops/clicks. However, with Dolphin 3.5-322 the clicks are not present (I only know this because revision 247's audio in this game is screwed up pretty bad and 322 fixed it so I kept it around). If I did have any programming knowledge this would be just the kind of thing I'd commit a lot of time and effort to, but alas. For what it's worth, I'm willing to test out any patches anyone might attempt.
Find
Reply
11-10-2013, 01:23 AM (This post was last modified: 11-10-2013, 01:29 AM by haddockd.)
#10
haddockd Offline
Dolphin Addict
*****
Posts: 838
Threads: 31
Joined: Jun 2011
agreed. I would be happy to test but I lack the skills to tackle a project like this programmatically Sad

Also keep in mind that 3.5-1576 (I think thats the one) had a significant change to AudioCommon because of the 1.5 hour static/garbled audio bug. Not sure if that is involved with this but it is worth noting.
i5-8600K @ 4.5 GHz
GeForce GTX 1080 SC2
ASRock Z370 Taichi LGA 1151
CORSAIR Vengeance LPX 16GB 2400 DDR4
SAMSUNG 970 EVO M.2 500GB PCIe SSD
Indigo Xtreme TIM
Phanteks Pro ES614P Black Steel Case
EVGA SuperNOVA 750W PSU
Windows 10 64-bit
Find
Reply
« Next Oldest | Next Newest »
Pages (4): 1 2 3 4 Next »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode