NESDev and Strangulation Records messageboards
Forum Index | FAQ | New User | Login | Search

Previous ThreadView All ThreadsNext ThreadShow in Flat Mode*


SubjectRe: Sound Question  
Posted byLaughy
Posted on7/29/03 10:28 PM
From IP64.161.57.25  



No, I don't see how your function could work, unless every time you write to the buffer you write about 28 buffer values or so. Your function creates one sample every 1153 cpu cycles, but by the time we reach 1789 cpu cyles the 44.1khz wave requires we have 44 samples already in our buffer, unless you have a differenct scheme of sending ticks to the function. Check out my code (which is written in delphi, but you'll get it):

http://www.laughy.net/Square.txt

This writes out 28 or so bytes per "sample" that the APU would send out. Thus the 1153 square wave is consisted of 16 * 28 or 448 bytes. For a 2/14 duty cycle, About 58 of those bytes should be 1s and the other 390 0s. We have already acknowledged this, and the code outputs this, however the sound isn't slightly off, it's OFF. Other emulators spit out 31 and 220 for the 0 and 1 phases respectively, which is 1.77x smaller each than ours.

:(



-
Entire Thread
Subject  Posted byPosted On
*Sound Question  Laughy7/29/03 6:16 PM
.*Re: Sound Question  Laughy7/29/03 8:36 PM
..*Re: Sound Question  Disch7/29/03 9:09 PM
..*Re: Sound Question  Laughy7/29/03 8:55 PM
.*Re: Sound Question  Disch7/29/03 7:28 PM
..*Re: Sound Question  Laughy7/29/03 8:11 PM
...*Re: Sound Question  Disch7/29/03 9:03 PM
....*Re: Sound Question  Disch7/29/03 9:05 PM
......Re: Sound Question  Laughy7/29/03 10:28 PM
......*Re: Sound Question  Disch7/30/03 00:05 AM
.......*Re: Sound Question  Laughy7/30/03 00:16 AM
........*Re: Sound Question  Laughy7/30/03 00:41 AM
.........*Re: Sound Question  Disch7/30/03 01:48 AM
Jump to

Memblers' homepage             Contact Me

Forums powered by WWWThreads Demo