Results 1 to 6 of 6

Thread: SpeccyDS News Update - it beeps

                  
   
  1. #1
    Won Hung Lo wraggster's Avatar
    Join Date
    Apr 2003
    Location
    Nottingham, England
    Age
    53
    Posts
    141,441
    Blog Entries
    3209
    Rep Power
    50

    NDS SpeccyDS News Update - it beeps

    CraigT posted this news about his upcoming Spectrum emulator for the DS:

    I have discovered a new definition for the word frustration. It goes by the name of a sound ring-buffer.

    Driving the sound on the DS is pretty straightforward. Its simply a case of setting up a sound channel and pointing it to a buffer that holds your sound data. This works perfectly for playing pre-defined samples. However, when attempting to stream sound data by creating and playing samples continuously the DS starts struggle. This causes popping and cracking in the sound.

    One method to get around this problem is the use of a ‘ring-buffer’. The theory involves creating an empty sample that is played in a continuous loop. The current play position of this empty sample is tracked using a timer. When a new section of sound data needs to be played it is mixed into the empty sample just ahead of the current play posision.

    As far as the hardware is concerned, it is just playing one sample over and over again, but it means that it is posible to alter the sample with the new data being streamed in.

    The theory doesn’t sound too bad. It is, however, very dependent on timing. If the new sound data is mixed in too slowly, the play position of the buffer will catch up and eventually override the newly mixed data. If the new sound data is mixed in too quickly, the mix position will wrap around the buffer and override the data currently being played.

    I have had major problems getting the timing to be perfect. I must have redesigned and wrote the sound code 6 or 7 times over the last few weeks without any real success.

    Anyway, on Monday I had a bit of free time so a sat down and rewrote it again from scratch. Its the closest i’ve been so far, and sounds pretty good. The mix position is still running slightly quicker than the play position, but if it runs too far forward I skip a sample until it catches up. This can cause the odd scratch in the sound, but it only appears noticable when playing a fixed tone (using the BASIC beep command for example).

    This whole problem does indicate that either the CPU core is running too fast or the sound is running too slow. At the moment I think its good enough to put into the first release and am going to move back to the file browser. Once i’ve cleaned it up a bit I think we are looking good for a release of Version 0.1.

  2. #2
    DCEmu Rookie
    Join Date
    Aug 2006
    Posts
    127
    Rep Power
    69

    Default

    dun really understand whats this really is....

  3. #3
    DCEmu Legend ACID's Avatar
    Join Date
    Feb 2006
    Location
    6 Feet Under
    Posts
    2,348
    Rep Power
    87

    Default

    Hopefully it will be great after the bug fixes.

  4. #4

    Default

    yay I can't wait


  5. #5
    DCEmu Rookie
    Join Date
    Feb 2006
    Location
    UK
    Posts
    102
    Rep Power
    71

    Default

    Spectrum always was the best 8-bit computer.

  6. #6

    Default

    Quote Originally Posted by basilb
    Spectrum always was the best 8-bit computer.
    Yeah right!

    Nothing to see here, drive through please.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •