pcm

数字音频接口(I2S,PCM/TDM,PDM)

倖福魔咒の 提交于 2019-12-27 16:15:33
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 概述 数字音频接口 DAI ,即Digital Audio Interfaces,顾名思义,DAI表示在板级或板间传输数字音频信号的方式。相比于模拟接口,数字音频接口抗干扰能力更强,硬件设计简单,DAI在音频电路设计中得到越来越广泛的应用。 图1 和 图2 对比传统的音频信号和数字音频信号链的区别。 在传统的音频电路( 图1 )中有麦克风、前置放大器、模/数转换器ADC、数/模转换器DAC、输出放大器,以及扬声器,它们之间使用模拟信号连接。随着技术的发展和对性能考虑,模拟电路逐渐被推到链路的两端(集成到设备内部),信号链中各集成电路间将出现更多的数字接口形式。DSP通常都是数字接口的;换能器(Transducers, i.e. Mic & Speaker)、放大器一般而言只有模拟接口,但现在也正在逐渐集成数字接口功能。 目前,集成电路设计人员正在将换能器内的ADC、DAC和调制器集成到信号链一端,这样就不必在PCB上走任何模拟音频信号,并且减少了信号链中的器件数量。 图2 给出了一个完整数字音频接口的例子。 图1. 传统的音频信号链路 图2. 数字音频信号链路 数字音频信号的传输标准,如 I2S 、 PCM (Pulse Code Modulation) 和 PDM (Pulse Density

How can I decode OGG vorbis data from a ByteBuffer?

时间秒杀一切 提交于 2019-12-25 09:27:01
问题 The libraries I founded so far only have methods to decode from a file or InputStream . I have a ByteBuffer with OGG vorbis data and I need it decoded to PCM without having to write it to a file first. 回答1: There seem to be 2 parts to this problem. 1) Getting Java Sound to deal with OGG Vorbis format. 2) Avoiding the File. For (1), the Java Sound API allows the addition of extra formats via the Service Provider Interface. The idea is to put an encoder/decoder into a Jar and use a standard

ffmpeg所有的解码器(decoders)

老子叫甜甜 提交于 2019-12-25 07:36:53
FFMPEG解码器 Decoders : V . . . . . = Video ( 视频流) A . . . . . = Audio(音频流) S . . . . . = Subtitle(字幕流) . F . . . . = Frame - level multithreading . . S . . . = Slice - level multithreading . . . X . . = Codec is experimental . . . . B . = Supports draw_horiz_band . . . . . D = Supports direct rendering method 1 -- -- -- V . . . . D 012 v Uncompressed 4 : 2 : 2 10 - bit V . . . . D 4 xm 4 X Movie V . . . . D 8 bps QuickTime 8 BPS video V . . . . D aasc Autodesk RLE VF . . . D aic Apple Intermediate Codec V . . . . D alias_pix Alias / Wavefront PIX image V . . . . D amv AMV Video V . . . . D anm

avformat_write_header return error code when trying to write PCMU encoded frame into avi/mov file

我的梦境 提交于 2019-12-25 04:35:41
问题 I am trying to write PCMU G.711 enocded data into avi multimedia container using below program which yields Error occurred when opening output file: Operation not permitted and when using mov container, it yields Error occurred when opening output file: Invalid argument . I set AV_CODEC_ID_PCM_U16LE as audio codec of output format and AV_SAMPLE_FMT_S16 as sample format. What's the problem here? Thanks in advance! 回答1: You're writing AV_CODEC_ID_PCM_U16LE, which isn't G711, but raw PCM

Playing PCM data using Audio Queues

青春壹個敷衍的年華 提交于 2019-12-24 21:50:27
问题 I have reffered to this to play a PCM file using Audio Queues. The code is as follows: #import "PlayPCM.h" AudioFileID audioFile; SInt64 inStartingPacket = 0; AudioQueueRef audioQueue; @implementation PlayPCM void AudioOutputCallback( void* inUserData, AudioQueueRef outAQ, AudioQueueBufferRef outBuffer) { AudioStreamPacketDescription* packetDescs; UInt32 bytesRead; UInt32 numPackets = 8000; OSStatus status; status = AudioFileReadPackets(audioFile, false, &bytesRead, packetDescs,

play a raw PCM byte from a wav file

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 16:27:26
问题 I have a wav file which was encoded with 16-bit PCM, I want to convert it to a PCM short array and play the raw array with audiotrack class. It is what I did: String fileName = "test.wav"; File f = new File(baseDir + File.separator + fileName); InputStream is = null; try { is = new FileInputStream (f); } catch (FileNotFoundException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } BufferedInputStream bis = new BufferedInputStream (is, 8000); DataInputStream dis = new

Append .pcm audio raw data into wav (in C)

自古美人都是妖i 提交于 2019-12-24 10:03:18
问题 After searching on google for a long, I was unable to find some answers. So,I thought to put question on stackoverflow. I can't share code here due to company policies but I can share links from where I get knowledge. So, what I am trying to do from couple of days - Converting .pcm file to .wav file format. I am sharing some links about wav header and how I design the struct wav and then write that header in .wav file after this I want to append .pcm raw data after writing the wave header but

Play PCM stream in Android

泄露秘密 提交于 2019-12-24 06:04:10
问题 I am getting PCM streams through ethernet port. So far, I am able to capture the packets and takeout the pcm_payload data from them. How to play this raw PCM data in android? The PCM data is 16-bit 2 channel, 44.1kHZ rate stream. I am both new to android application programming and audio programming. Sorry if this is a trivial question. 回答1: You can use AudioTrack to play PCM data! Maybe like this: int bufsize = AudioTrack.getMinBufferSize(44100, AudioFormat.CHANNEL_OUT_STEREO, AudioFormat

What exactly does a Sample Rate of 44100 sample?

被刻印的时光 ゝ 提交于 2019-12-23 17:06:09
问题 I'm using FMOD library to extract PCM from an MP3. I get the whole 2 channel - 16 bit thing, and I also get that a sample rate of 44100hz is 44,100 samples of "sound" in 1 second. What I don't get is, what exactly does the 16 bit value represent. I know how to plot coordinates on an xy axis, but what am I plotting? The y axis represents time, the x axis represents what? Sound level? Is that the same as amplitude? How do I determine the different sounds that compose this value. I mean, how do

apply for .pcm file as sox

青春壹個敷衍的年華 提交于 2019-12-23 05:28:16
问题 I want to exchange 16kHz pcm --> 48kHz wav using sox. however, pcm file isn't applied in sox. so, I just changed pcm to raw, and then sox -r 16000 -e signed -b 16 -c 1 test.raw -r 48000 out.wav Can I apply for pcm file not convert raw? 回答1: For the PCM file, since PCM's are headerless, you need to add '-t raw' as the first argument. sox -t raw -r 16000 -e signed -b 16 -c 1 test.raw -r 48000 out.wav Try that out. Also try the different Endian settings; -L; -B; -x though only use one at a time,