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

Using AudioTrack to EQ a .WAV file?

I need to do some EQing and apply a digital effect for a .wav file. Is there any way of extracting individual PCM sample values from "buffer" below to carry out some EQ/processing? Is AudioTrack the right way to do this? private void playSound()…
chilipepper
  • 105
  • 1
  • 10
0
votes
2 answers

Downsampling pcm/wav audio from 22khz to 8khz

My android application needs to convert PCM(22khz) to AMR , but the API AmrInputStream only supports with pcm of 8khz. How can i downsample the pcm from 22 khz to 8 khz?
Raneez Ahmed
  • 3,808
  • 3
  • 35
  • 58
0
votes
1 answer

PCM sample position [byte offset] in flac

I have a flac file and I have to do some analysis on the waveform looking for a particular sample. So I decompressed them in PCM data, but then I need to know, where is that particular sample in the flac file. So: I know the byte offset in the PCM…
fortea
  • 345
  • 4
  • 15
0
votes
1 answer

pcm input on mp3 encoder

does anyone know how a PCM input is partitioned in a mp3 encoder? I already know that each input is a small part of the original wave and inside the encoder it's divided in 32 smaller parts and so forth, but what is the size of this initial input?
0
votes
1 answer

Data length in PCM Wave file using MemoryStream with WaveFileWriter

Scenario: I am using NAudio 1.5 and I am trying to record a Sinus wave from an IWaveProvider in format PCM, 8bit, 22050hz like this: Private Sub record(ByVal waveForm As String, _ ByVal duration As Integer, _ …
Dynamicbyte
  • 541
  • 1
  • 5
  • 13
0
votes
1 answer

Is there a way to play a CCITT u-Law .wav file in C#?

Having failed to find a way to programmatically convert a CCITT u-Law wave file to a PCM file (which Soundplayer demands) in accord with this question: How to play non-PCM file or convert it to PCM on the fly ? (SOX looks like it might work, but I…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
0
votes
0 answers

alsa on my target device says "cannot find card'0'"

I'm trying to enable my target's sound card to work through ALSA, it's a Qualcomm MSM8660 Snapdragon which means there is no pci devices and running a kind of embedded linux. Because this device is originally a commercial android phone so I'm sure…
Jun
  • 181
  • 2
  • 3
  • 7
0
votes
1 answer

when audioqueue play lpcm decoded from ffmpeg, the elapsed time of audio queue exceeds the duraion of the media

When play the lpcm data decoded from ffmpeg with audioqueue, the elapsed time got by AudioQueueGetCurrentTime exceeds the duration of media. But when decode the same media with AVFoundation framework, the elapsed time equals duration of the media,…
zhzhy
  • 461
  • 3
  • 17
0
votes
1 answer

How to detect silence with IMediaSample in PCM audio

I need to detect silence in PCM audio stream with IMediaSample. Signal is provided by TV and is connected with PC by optic cable to Prodigy 7.1 HiFi soundcard. So far I have this: bool detectSound(IMediaSample *pSamples) { BYTE *pData; …
eclipse
  • 693
  • 9
  • 30
0
votes
1 answer

HResult 0x80040204 from IMediaObject::ProcessInput

I get this Hresult when i resample PCM Sound to a IEEE:Float Sound with DirectXMediaResampler. Changing the bits per sample with the same sampling rate is no problem. Also resamppling from IEEE:Float to PCM. This HResult is not documented in context…
0
votes
1 answer

avoid static and distortion when chaining together pcm samples

I have the problem of stitching together pcm audio samples from various parts of an audio recording. The idea is that it is audio feedback from a user seeking through a recording on a progress bar of sorts. They could be of an arbitrary length (say…
Jonathan S.
  • 1,540
  • 1
  • 15
  • 26
0
votes
1 answer

Drawing waveform for wav audio in Android

My android application needs to draw Waveform for the audio recorded as raw pcm using AudioRecord class. I went through the source code of opensource project RingDroid , which shows waveform and process audio in android, but i couldn't…
Raneez Ahmed
  • 3,808
  • 3
  • 35
  • 58
0
votes
1 answer

RTP over GTP with PCMU content- Disection

How the GTP-u content being dissected by Wireshark? Is the content inside GTP-U also encrypted if i don't have the ipsec over it? I have some G711 PCMU content with GTP tunneling as shown by Wireshark but i am seeing there are two packets with the…
NitinG
  • 893
  • 3
  • 21
  • 38
-1
votes
2 answers

Compilation error: 'PCM' does not name a type; did you mean 'PC0'?

C:\Users\ownas\OneDrive\Documents\Arduino\0to9ver1\0to9ver1.ino:28:1: error: 'PCM' does not name a type; did you mean 'PC0'? PCM player; ^~~ PC0 C:\Users\ownas\OneDrive\Documents\Arduino\0to9ver1\0to9ver1.ino: In function 'void…
-1
votes
1 answer

How to Combine two Live Streams(mjpeg + pcm) for ffmpeg or ffplay playback?

What's the correct command to combine two live streams (mjpeg + pcm) for playback? Currently, I have to playback them separately via ffplay. Is it possible to combine them as one for playback? //video stream mjpeg ffplay…
sharimken
  • 169
  • 5
1 2 3
51
52