• #### How to convert Level value to dB ?

Posted by Legacy on 01/21/2004 12:00am

Originally posted by: wyw

Hi,

Is there a way to convert the Level value return by the Mixer into dB ?

Thank You,
wyw

• #### is very easy

Posted by alainstgt on 12/07/2005 11:10am

the dB value is 10*log10(level/reference level). In acoustics the refence sound pressure is 0.00002 Pa (Pascal), the reference level the square of that value. Since an addition is performed much faster than a division, you can change the formula like following: 10*(log10(level)-log10(reference level)). With rhe previous mentioned value, you get log10(reference level)= 93,9794 dB, which is usually rounded to 94 dB. So thr formula to get the dB level is: dB = 10*log10(sound pressure level) - 94! thats all. Note that what is commonly named the level, is in a strenght way not the level, but I used your terminology to not confuse.

• #### Getting Left/Right channel level values

Posted by Legacy on 01/20/2004 12:00am

Originally posted by: wyw

Hi,

How do you go about extracting the individual left and right channel peak level value from a playing wave file?

m_channels.level //This seem to be the combined result of left and right

Thank You,
wyw

• #### Help with wave mixing algorithm

Posted by Legacy on 01/19/2004 12:00am

Originally posted by: Ashley McGilvery

Hi would you be able to describe in words the algorithm for mixing the waves. The one I am using at home is to add the samples and devide by the number of tracks. This works although the volume seems to be belong unity level.

• #### Problem compiling with Visual Studio 7

Posted by Legacy on 01/10/2004 12:00am

Originally posted by: cslick

Hi Colin,

I see that you created your project with Visual C++ 6, but I'm trying to build in VC++ 7 and getting an error: "error C3803: 'bool:Property::AsString()': property has a type which is incompatible with one of its accessors 'CString&Property::asstring(void)'. The problem is on line 56 of "Property.h". I am very new to windows programming - any clue how to fix this error? Thanks.

• #### Mixing properties

Posted by Legacy on 09/21/2003 12:00am

Originally posted by: Lee

Thanks for your short tutorial on compiling.
A few days ago you replied to my request for help on the filterstream(echoes) & I hope you can help me once again.

I wanted to create an echo that is one second later. So I altered the getbuffer virtual method of wavestream by reading data from the audio file twice & putting them in 2 different buffers:

1)fread from file into buffer.data (of wavebuffer buffer)

2)fseek -11*RequestSize from SEEK_CUR (1 sec offset)
- fread from file into buffer1.data(of wavebuffer buffer1)

4)return buffer2 (which mixes buffer & buffer1)

I have created 3 buffers- buffer which contains the current audio data, and buffer 1 which contains audio data 1 secs back. buffer 2 is supposed to be a mix of the 2 buffers.

I have read how u mix the streams in the mixer & frankly it was difficult for me to understand (I am still a beginner). Do you mind giving me advice on how I can combine the 2 buffers' data & store them into buffer2 ?

Thanks a million.

regards,
Lee

• #### Can you help me...

Posted by Legacy on 09/16/2003 12:00am

Originally posted by: Lee

Hi,

So sorry to trouble you. Previously I was doing a project using your audio classes. What I did was just copy the header files for the various classes into my external dependencies & the dAudiolib.lib.It worked. However I find I have trouble trying to add more functions to the program.

I was trying to add the function waveOutSetPitch in Player.cpp but cannot find it in my project directories. So I copy it over & edited it. However there is a "unexpected end of file while looking for precompiled header directive" problem when I was compiling Player.cpp. I tried compiling your original player.cpp in your demo project, & the same thing happens.

Am I missing out on something here? Did I forgot to do something.

Lee

• #### Filter Stream help.

Posted by Legacy on 09/05/2003 12:00am

Originally posted by: Lee

I am trying to find a way to add some other functions to the conversion stream. Anybody knows of any examples (such as adding echoes, reverberation or audio filters) that can manipulate the buffers in the stream.

Thanks.

Thank You. Mr Colin. I will try that out.

• #### Great example!

Posted by Legacy on 07/07/2003 12:00am

Originally posted by: Petras

Thanks for a great piece of code. Guys, don't complain about a couple of bugs - the most important is the idea itself. Thanks again!

• #### help ?how can I debug this program?

Posted by Legacy on 04/09/2003 12:00am

Originally posted by: ken zhu

```when I try to compile this project ,the error infomation likes this:fatal error C1083: Cannot open include file: 'fftw-int.h': No such file or directory.
I find the fftw-int.h in the "fftw" directory,I get it
I copy this file to rfftw directory ,but the compile report
the same error infomation?
who can tell me how to solve this problem?
thanks very much!
```

• #### Terminal click

Posted by Legacy on 01/30/2003 12:00am

Originally posted by: Bob Fish

Great program and interesting source code. One problem that's been bothering me, that I haven't been able to track down, is that the mixer ends some audio files (like Jungle Error.wav) with a click sound that isn't in the wave file. Anyone else have this problem? Any fixes known? Thanks.

Bob Fish <><