Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Sound mixing   Message List  
Reply | Forward Message #14787 of 15019 |
Re: Sound mixing

--- In gbadev@yahoogroups.com, Josh DeBonis <joshdebonis@y...> wrote:
> I'm trying to mix 2 sound samples on the GBA. When I
> play them individually, they sound great. When I mix
> them together, a sound is produced, but it's not
> pretty. I am simply adding the values of each sample
> together (it is a sample of the amplitude). I have
> tried scaling down the amplitudes before I add them,
> to prevent clipping, and this does not prevent the
> problem. Do I have to do any strange adding because of
> twos complement? Anyone know what I might be missing?
>
> Thanks,
> Joshua

For example, at
http://www.work.de/nocash/gbatek.htm#soundchannelaandbdmasound you
can find that GBA's Direct Sound channels can reproduce sound of
signed 8bit data. therefore, if your input digitized sounds are 8b
signed, you needn't adjust it in any way.
mixing of 2 channels means:
1) doing average out of each input samples (in case of 2 channels it
really is: (sampleA+sampleB)/2)
2) clipping the result value to range of signed 8 bits ie. -
128...127.

btw. isn't the problem anywhere else? are you sure that, 4xmpl the
DMA suffices to the mixing speed, etc?
good day





Mon Jul 5, 2004 2:53 pm

hidalgo944
Offline Offline
Send Email Send Email

Forward
Message #14787 of 15019 |
Expand Messages Author Sort by Date

I'm trying to mix 2 sound samples on the GBA. When I play them individually, they sound great. When I mix them together, a sound is produced, but it's not ...
Josh DeBonis
joshdebonis
Offline Send Email
Jan 26, 2004
9:09 pm

Your samples are clipping, that's what you're hearing. What you have to do is to add the two of them and then create the average. destSample = ( sample1 +...
Guido Henkel
guidohenkel
Offline Send Email
Jan 26, 2004
10:12 pm

... uuuwww... no, please dont, this is a common misconception. while this will prevent the clipping, it is still not what you want. what you need to do is a)...
Groepaz
groepaz2000
Offline Send Email
Jan 27, 2004
9:46 am

Are you limiting the output (by adding in 16 bit and then limiting)?: if (sampleL > 127) sampleL = 127; if (sampleL < -127) sampleL = -127;...
gb_feedback
Offline Send Email
Jan 27, 2004
9:18 am

I was going to start this off by arguing that you should use 32 bit not 16 bit as it should be more efficient on the ARM. If you start off with signed 8 bit...
David Welch
dwelchgba
Offline Send Email
Jan 27, 2004
7:01 pm

my mingw based gcc for arm has been updated with gcc 3.3.3 http://homepage.ntlworld.com/wintermute2002/ any problems give me a shout :) Dave...
Dave Murphy
gameboy_dave
Online Now Send Email
Feb 20, 2004
7:49 pm

Hello Dave. Did you apply the GCC-3.3.3 thumb patch to build the MinGW version? Regards....
Pablo Bleyer Kocik
pablobleyer
Offline Send Email
Feb 20, 2004
8:50 pm

um, yeah. It's kind of required to build it at all :)...
Dave Murphy
gameboy_dave
Online Now Send Email
Feb 20, 2004
8:57 pm

recent updates include binutils 2.15.90, newlib 1.12.0 and finally, a win32 native build of Insight 5.2.1. I've also added the SDL version of Visualboy Advance...
Dave Murphy
gameboy_dave
Online Now Send Email
Mar 25, 2004
10:54 am

devkitARM release 11 is now available on the devkitpro sourceforge pages http://sourceforge.net/projects/devkitpro * updated to gcc 3.4.3 * reverted msvc...
Dave Murphy
gameboy_dave
Online Now Send Email
Feb 24, 2005
10:44 pm

... For example, at http://www.work.de/nocash/gbatek.htm#soundchannelaandbdmasound you can find that GBA's Direct Sound channels can reproduce sound of signed...
hidalgo944
Offline Send Email
Jul 5, 2004
8:26 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help