Compressing audio using GSM or other codec (winxp)

N

Nuno Magalhaes

Is there any way to encode a byte stream of audio data into GSM or
other codec data, and the decode also?
I searched all over the Internet and didn't find any valid solution
applying to C#.
I'm using waveIn and waveOut (from winmm.dll) but I would like to avoid
messing with that low level stuff. I would prefer applying an
encoder/decoder directly to the byte stream.
Is it possible? How can I do it?
 
J

jeremiah johnson

Nuno said:
Is there any way to encode a byte stream of audio data into GSM or
other codec data, and the decode also?
I searched all over the Internet and didn't find any valid solution
applying to C#.
I'm using waveIn and waveOut (from winmm.dll) but I would like to avoid
messing with that low level stuff. I would prefer applying an
encoder/decoder directly to the byte stream.
Is it possible? How can I do it?

I've not seen one, but here's one written in C if you want to port it.

http://www.ddj.com/documents/s=1012/ddj9412b/
 
J

jeremiah johnson

Nuno said:
Is there any way to encode a byte stream of audio data into GSM or
other codec data, and the decode also?
I searched all over the Internet and didn't find any valid solution
applying to C#.
I'm using waveIn and waveOut (from winmm.dll) but I would like to avoid
messing with that low level stuff. I would prefer applying an
encoder/decoder directly to the byte stream.
Is it possible? How can I do it?

also, here is a Java version, which should prove much easier to port.

http://pix.test.at/java/gsm/index.html
 
P

Padu

"Nuno Magalhaes"
Is there any way to encode a byte stream of audio data into GSM or
other codec data, and the decode also?
I searched all over the Internet and didn't find any valid solution
applying to C#.
I'm using waveIn and waveOut (from winmm.dll) but I would like to avoid
messing with that low level stuff. I would prefer applying an
encoder/decoder directly to the byte stream.
Is it possible? How can I do it?

I use a set of components for Delphi (haven't ported my app to c# yet). The
library that I use is a wrapper for the windows acm (audio conversion
manager), and if you are already using the winmm.dll, you shouldn't have
problems using msacm32.dll.
Personally, I hate having to deal with winapi myself, but I couldn't find a
good multimedia library such as MMTools for delphi.

Cheers

Padu
 
N

Nuno Magalhaes

Do you know where can I get more information about msacm32.dll and its
use in C#? Can't find anything related to that API. Which wrapper are
you using and where can I download it?
 
N

Nuno Magalhaes

Can I apply the acmStreamOpen, acmStreamClose, acmStreamConvert to
short byte sequences like 256 bytes of audio samples, or is it too
slow?
I want to transmit the audio data encoded over the network and decode
it on the client side, but I don't know if it is a good solution to use
msacm32.dll.
 
P

Padu

"Nuno Magalhaes"
Can I apply the acmStreamOpen, acmStreamClose, acmStreamConvert to
short byte sequences like 256 bytes of audio samples, or is it too
slow?
I want to transmit the audio data encoded over the network and decode
it on the client side, but I don't know if it is a good solution to use
msacm32.dll.

I'm using MMTools from www.swiftsoft.de
Unfortunately they only have it for delphi as a vcl package, although I
believe they also have an activeX wrapped version.
In my application, I'm using their wrapper to do real time (well, close to
real time) conversion of PCM data from a microphone into GSM 6.10 and saving
to a file. I seldom had to use the acm??? functions directly, but I believe
that's exactly what my library is doing, converting short frames of data
from one format to another.

From my understanding, you have two options:
1) [utopic] Study and implement your own codec from/to the formats you want
to use
2) Use the msacm32.dll.

For more information on the ACM, start here:
http://msdn.microsoft.com/library/d...pression_manager_functions_and_structures.asp

I may be wrong, by I believe the only way to use it from C# is through
P/Invoke


Cheers and good luck

Padu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top