Questions tagged [pcm]

Use this tag for questions about the Pulse-Code Modulation representation of sampled signals.

Pulse-Code Modulation (PCM) is a method used to digitally represent sampled analog signals. It is the standard form for digital audio in computers and various Blu-ray, DVD and Compact Disc formats, as well as other uses such as digital telephone systems. A PCM stream is a digital representation of an analog signal, in which the magnitude of the analog signal is sampled regularly at uniform intervals, with each sample being quantized to the nearest value within a range of digital steps. PCM streams have two basic properties that determine their fidelity to the original analog signal: the sampling rate, which is the number of times per second that samples are taken; and the bit depth, which determines the number of possible digital values that each sample can take.

Pulse-code modulation is an uncompressed audio encoding method. PCM is used in the .WAV, and .PCM file formats, and for encoding audio CDs, among many other uses. Digital signal processing algorithms like filters or FFT interact with the data when its in PCM format. When compressed audio format conversions are made, say from aac to flac, the data is converted from the source codec into PCM and then into the target codec. PCM can be considered the fundamental representation of digital time series data (EG. audio, financial ticker prices).

An alternative to PCM, with its sample rate and bit depth measurements, is the notion of storing the curve as a series of one bit samples. Instead of the ADC generating a sample of the absolute location of the height of the input analog curve when using the PCM approach, with this alternative one bit sample approach the ADC generates the relative position of the input analog curve. This one bit approach is memory efficient when performing very high sample rates.

780 questions
0
votes
1 answer

Single float conversion to java signed PCM wav short for javax.sampled SourceDataLine has too many lines?

As starting point I have a method that works. But it seems to have too many lines or overlapping actions. If you are audio wizard then you see immediately how to boil this down. So how to boil this down? public static byte[] float16toDualByte(byte[]…
Tonecops
  • 127
  • 9
0
votes
2 answers

How does image digitalization differ from sound digitalization (PCM)?

I am trying to understand digitalization of sound and images. As far as I know, they both need to convert analog signal to digital signal. Both should be using sampling and quantization. Sound: We have amplitudes on axis y and time on axis x. What…
Sirdhemond
  • 63
  • 1
  • 8
0
votes
0 answers

AudioTrack unable to control Headphone sound in either side

I am working on AudioTrack Pcm sound generation. I am trying to control volume for either side of the earpiece in the headphone via setStereoVolume() method i.e only one side of the headphone need to hear. But unable to completely stop the sound in…
0
votes
0 answers

FFmpeg Decklink playout audio PCM

I'm working on a ffmpeg playout application for Decklink but I'm facing some audio issues. I've seen other questions about this topic but none of them are currently helping. I've tried Reubens code (https://stackoverflow.com/a/15372417/12610231)…
0
votes
1 answer

playing pcm data on iphone

i need to play linear pcm data live on a iphone. i get a LIVE datastream via RTSP, and i can currently read it out from iphone, save it into a file, play it on a desktop audioplayer that supports pcm, therefore i think the transport is okay. now i…
aegas
  • 1
  • 1
0
votes
1 answer

Cannot play PCM stream with Encoding ENCODING_PCM_FLOAT

I know that there are a lot of questions about this topic. But I'm having issue with ENCODING_PCM_FLOAT. I have an PCM stream with following information: Encoding : 32 bit float Byte order: Little Endian Channels : 2 channels ( stereo) Sample Rate :…
Banana droid
  • 690
  • 1
  • 9
  • 27
0
votes
1 answer

Java Sound PCM Stream over wifi/tcp is very "staticy"

I've written a program that transmits a PCM stream from my pc to another pc or my android(using an AudioTrack). It uses java sound and takes the target and source lines from the Stereo Mix mixer. Everything technically works (sockets, mixers, lines,…
wteason2
  • 1
  • 1
0
votes
0 answers

How to change the format of a Wav File in .NET?

I am trying to change the format of a wav file in .Net from a 32 bit, 44100 samplerate, stereo wav file to a 16 bit, 44100 samplerate, stereo wav file. The code Ive already tried with Naudio: public static byte[] ChangeWavQuality(Stream filePath,…
0
votes
1 answer

How to change the volume of a PCM stream without floating point

I'm trying to imagine a way to change the volume of a PCM stream without the use of floating point numbers, to be able to do the job on simple dedicated hardware. I found very interesting this thread: How to change the volume of a PCM data stream…
Axel
  • 1
  • 3
0
votes
1 answer

8bit PCMU Encoder/Decoder

I have 16 bit PCM audio and I want to convert it to 8bit PCMU. As far as I know 16bit to 8 bit conversion is easy - just drop the last 8 bits from each sample. I want to know how to convert 8 bit pcm to 8 bit pcmu? Any article or sample code will…
gop
  • 2,150
  • 5
  • 26
  • 54
0
votes
1 answer

Convert an audio file to 8000Hz 16Bit Mono Wav in UWP

How to convert an audio file to 8000Hz 16Bit Mono Wav in UWP C# to be used in ACRcloud UWP SDK
Ahmed Walid
  • 57
  • 2
  • 10
0
votes
1 answer

how can I get raw audio pcm data from webm file using opus codec

I am making a ASR server uisng open source. client side send the voice data through websocket in webm file format. in server side, first receive the 8bit msg. it is done by libwebsocket. then I want to get a raw pcm data using opus codec. I heard…
user225549
  • 177
  • 2
  • 9
0
votes
1 answer

How to check Sampling rate of .pcm files?

I am converting a .wav file to .pcm file using gstream, i need to verify the sampling rate of .pcm file after converting. Which tool can i use for this?Or is there any way to check it?Sorry if its a wrong question. Already i tried with sox tool, but…
Maddy26
  • 107
  • 1
  • 10
0
votes
0 answers

Converting pdm data into pcm or other audio data format

I'm working on an embedded system (NUCLEO-L476RG) with a pdm (pulse-density modulation) MEMS microphone. Mind you that I'm not very familiar with audio processing. The program can currently convert pdm values into the frequency domain through fast…
0
votes
1 answer

Reading 24 bit mono PCM in Java

I am struggling to understand the 24 bit mono PCM audio format data and read this data in Java. I understand and can read RIFF header but cannot figure out how to read 24 bit PCM samples. I need to read PCM samples one by one.
user1744147
  • 1,099
  • 13
  • 30