473,326 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Compressing audio using GSM or other codec (winxp)

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
6 5614
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
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
"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
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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ron Provost | last post by:
Hello, I'm developing a piece of software to assist illiteraate adults to learn to read. I'm trying to figure out how, if possible, to make audio playback asynchrnous but still controllable. ...
0
by: Federico Coppola | last post by:
Hi all I'm writing a network audio client, how can I play audio data received from a socket assuming that: - The audio data is encoded (presumably mu-law PCM or MPEG-1 audio) - I have the...
2
by: ViperCB | last post by:
Hello from a newbie, I am trying to do some research on an upcoming project that involves reading in audio files of various formats and using the audio signal as a source of noise to generate...
6
by: Quentin | last post by:
Hi, I want to save an audio stream into a circular file so that I only keep say the last hour's audio. Can anybody help? Cheers, Quentin
3
by: Ryan Liu | last post by:
Hi, I want to play Audio/Video in my C# application(standlalone, not web applicatoin). The source of multimedia may in different formats and decided by the end user, which I have no control. ...
3
by: elnazzhonarr | last post by:
Hi My sound driver is Sigma Tel High Definition Audio CODEC. My computer model: DELL inspiron 1420 and my os is win xp professional. but I can not find any suitable sound driver for it,could u plz...
1
by: mahiapkum | last post by:
Hi all,i am developing an application for which i need G.729 Audio codec.Pls can anyone tell me where i can get the C source code of this codec.
0
by: drimota | last post by:
I have Dell Inspirion 1501. The sound card is SigmaTel High Defenition Audio CODEC. I've noticed permanent sound while using either head set or acoustic systems or built-in sound system. It sounds...
1
by: patelss23 | last post by:
Hello All Experts, I am quite new to Ctypes. I am using one c library and writing python bindings for it. I need to pass a character pointer to one function. I am reading one mp3 file and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.