By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,333 Members | 1,381 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,333 IT Pros & Developers. It's quick & easy.

Compressing audio using GSM or other codec (winxp)

P: n/a
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?

Apr 5 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Nuno Magalhaes wrote:
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/
Apr 5 '06 #2

P: n/a
Nuno Magalhaes wrote:
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
Apr 5 '06 #3

P: n/a
"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
Apr 5 '06 #4

P: n/a
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?

Padu wrote:
"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


Apr 6 '06 #5

P: n/a
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.

Apr 6 '06 #6

P: n/a
"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/de...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
Apr 6 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.