473,763 Members | 9,161 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5645
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, acmStreamConver t 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, acmStreamConver t 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
4299
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. I'm using python 2.4 with pymedia on XP. I started out with the example in the tutorials section of the pymedia website. The pymedia docs imply to me that playback using Output's play() method should already be asynchronous and controllable. I...
0
1044
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 right codec installed on client machines ?
2
2626
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 pretty pictures. (like windows media player visual plugins. I will be developing in C++ and was wondering if there are any packaged libraries out there that I can use to read audio files encoded in different formats and lets me easily access the...
6
1996
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
8378
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. My question is -- which is the best approach to add multimedia capability to my c# application, to support most possible formats, and make it easiest for the end user(e.g. does not need convert before play it)?
3
31519
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 help me? thanks elnaz
1
1906
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
2753
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 like crackle or crepitation. I've reinstalled drives but it hasn't helped. What else can be done in this situation?
1
3112
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 decoding it to raw pcm using pymedia. Now I need to pass this raw data in to a C function. Here is my code.
0
9564
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10148
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9938
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8822
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6643
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2794
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.