Audio PCM manipulation library for Linux

Audio PCM manipulation library for Linux

Post by Deathst » Sat, 30 Aug 2003 00:02:33



Hi,

I'm working on an embedded ARM board running Linux 2.4.18. The
processor is a Hynix 7201 based on ARM720T core, running at 60MHz (25
BogoMIPS), with a Piccolo DSP.

I want to change the audio volume by software, however the board
doesnt have any hardware mixer for audio. So changing the volume via
OSS etc. is not possible.

Since I require only to playback WAV PCM files, i figure that instead
of using a hardware mixer, i can amplify the signals inside the file
as required, to get the required volume.

Can someone please point me to libraries that allow amplifications of
signals stored in a PCM file? Please remember it has to be cross
platform to run on the ARM, and fast since the processor isnt quite
the heavy-duty kind.

TIA,
Deathstar

 
 
 

Audio PCM manipulation library for Linux

Post by Roger Larsso » Sat, 30 Aug 2003 07:28:33



> Hi,

> I'm working on an embedded ARM board running Linux 2.4.18. The
> processor is a Hynix 7201 based on ARM720T core, running at 60MHz (25
> BogoMIPS), with a Piccolo DSP.

> I want to change the audio volume by software, however the board
> doesnt have any hardware mixer for audio. So changing the volume via
> OSS etc. is not possible.

> Since I require only to playback WAV PCM files, i figure that instead
> of using a hardware mixer, i can amplify the signals inside the file
> as required, to get the required volume.

The easiest is probably to shift a number of bits left.
It might not give exact amplification but should be OK.

Quote:

> Can someone please point me to libraries that allow amplifications of
> signals stored in a PCM file? Please remember it has to be cross
> platform to run on the ARM, and fast since the processor isnt quite
> the heavy-duty kind.

Read file, shift, output.

For other applications/libraries see:
        http://linux-sound.org/

/RogerL
--
Roger Larsson
Skellefte?
Sweden

 
 
 

1. Audio question: What exactly is PCM

Reading about the linux sound architecture, i came across the question how are
analog signals digitized. After searching around, I found a hint that a common way
to do this is PCM. I also read that this method  sample the input signal
regularly and uses quantizing levels to code
the singnals amplitude digitally. It was mentioned that this Method is used in
telephony systems usually at sampling rates of 8000Hz and 8bit samples.

No I have several understanding problems. Hope someone can help me to clarify
this:
        - What does PCM stand really for? Are there other ways to digitize a
          analog signal than to sample it several thousand times a second and to
          measure the amplitute and code this value digitally (what I think the
          term PCM stands for)?

        - Is PCM bound fixed to 8000 Hz sampling rate, or is this just a value
          often used in telephony systems?  

        - who does the encoding when thinking of a
          soundcard in my linux box if I record e.g. something from the Microphone?
          Is it already done by the ADC in the Hardware of the soundcard,
          so everything that comes out of the soundcard is
          basically PCM-encoded, or is it
          done in any software layer sitting on top of the soundcard hardware
          so that basically there could be data that are not PCM-encoded.

          Putting it the other way around: say I issue the command
          cat /dev/dsp > sound.
          Is this data in the file "sound" PCM-encoded? Could it it be encoded
          differently.

Thanks at lot for any help understanding this
Rainer
--

2. HELP: tty I/O error

3. PCM 5820 Geode Audio Problems

4. WTD RS6000 memory

5. Audio 24-bit PCM

6. wireless applications development

7. Network Audio Server -- PCM error

8. Netscape and OSE 5.0.0 help

9. PCM Audio format and l3dec

10. multiple mp3 to pcm/raw results in one audio file (with mpg123)

11. HELP reading PCM audio on sparc20?

12. pcm audio (kills processor util.)

13. Image manipulation library