audio buffering and timing discrepancies
Moderator: Moderators
Re: audio buffering and timing discrepancies
If you're looking for a good MMC3 test program that breaks a lot of emulators, try my Chu Chu Rocket homebrew game.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Re: audio buffering and timing discrepancies
koitsu wrote:When firing Megaman's gun, there is what sounds like a bass-y "fart" noise at the end of the effect.
Did you ever find the cause of this? I'm currently writing my APU emulation code (moving off of Blargg's nes_snd_emu library) and have run into the same issue. Here's what's being output from the square2 channel when Mega Man jumps off of the title screen. The fart noise is the low frequency wave between the higher frequency chunks.miker00lz wrote:Yeah, you're right I can hear the fart noise.
Here's a log of writes to the channel. The first column is the sample number (multiply by 37 to get CPU cycle). The writes are time (s.ms): address - value, and the interspersed lines represent changes in square channel output (envelope volume, output yes/no, sweep unit output, timer period, and length counter value).
Code: Select all
00146109: 0009 0001 0001 0114 0254
00146115: 0009 0000 0001 0114 0254
00146159: 0009 0001 0001 0114 0254
00146165: 0009 0000 0001 0114 0254
00146208: 0009 0001 0001 0114 0254
00146215: 0009 0000 0001 0114 0254
00146258: 0009 0001 0001 0114 0254
00146264: 0009 0000 0001 0114 0254
00146308: 0009 0001 0001 0114 0254
00146314: 0009 0000 0001 0114 0254
00146358: 0009 0001 0001 0114 0254
00146364: 0009 0000 0001 0114 0254
00146407: 0009 0001 0001 0114 0254
00146414: 0009 0000 0001 0114 0254
00146457: 0009 0001 0001 0114 0254
00146463: 0009 0000 0001 0114 0254
00146507: 0009 0001 0001 0114 0254
00146513: 0009 0000 0001 0114 0254
00146540 57.877: 4004 - 39
00146544 57.877: 4006 - 33
00146554 57.877: 4015 - 07
00147344 57.888: 4004 - 39
00147348 57.888: 4006 - F4
00147349 57.888: 4007 - FF
00147358 57.888: 4015 - 07
00148011: 0009 0001 0001 2036 0030
00148122: 0009 0000 0001 2036 0030
00148149 57.898: 4004 - 39
00148153 57.898: 4006 - B5
00148163 57.898: 4015 - 07
00148872: 0009 0001 0001 1973 0030
00148954 57.908: 4004 - 39
00148958 57.908: 4006 - 76
00148968 57.908: 4015 - 07
00148979: 0009 0000 0001 1910 0030
00149702: 0009 0001 0001 1910 0030
00149759 57.919: 4004 - 39
00149763 57.919: 4006 - 37
00149773 57.919: 4015 - 07
00149805: 0009 0000 0001 1847 0030
00150504: 0009 0001 0001 1847 0030
get nemulator
http://nemulator.com
http://nemulator.com
Re: audio buffering and timing discrepancies
At first I was going to ask what motivated this, then I saw it was off my APU code, not the resampling library. Your own APU code; more power to you! It's fun to implement.James wrote:moving off of Blargg's nes_snd_emu library
As for the problem sound, I bet you aren't implementing the sweep's silencing of a channel when its frequency gets too low. Remember that this occurs even when sweep is disabled. I haven't looked over your log, just taking a guess.
Re: audio buffering and timing discrepancies
It was fun -- then I ran into this issue . Thanks, by the way, for the library and all the documentation!blargg wrote:At first I was going to ask what motivated this, then I saw it was off my APU code, not the resampling library. Your own APU code; more power to you! It's fun to implement.James wrote:moving off of Blargg's nes_snd_emu library
Unfortunately, that's not it.As for the problem sound, I bet you aren't implementing the sweep's silencing of a channel when its frequency gets too low. Remember that this occurs even when sweep is disabled. I haven't looked over your log, just taking a guess.
get nemulator
http://nemulator.com
http://nemulator.com
Re: audio buffering and timing discrepancies
Actually, that's exactly what it is . I completely misunderstood what was going on there...James wrote:Unfortunately, that's not it.blargg wrote:As for the problem sound, I bet you aren't implementing the sweep's silencing of a channel when its frequency gets too low. Remember that this occurs even when sweep is disabled. I haven't looked over your log, just taking a guess.
Thanks!!!
get nemulator
http://nemulator.com
http://nemulator.com