wav

Cannot convert argument 1 from 'const char [5]' to 'LPCTSTR'

瘦欲@ 提交于 2019-12-12 14:32:57
问题 I'm using this codeproject: http://www.codeproject.com/Articles/10138/Voice-Recording-Playing-back-using-simple-classes void CFisterDlg::OnRecord() { CString string; m_RecButton.GetWindowText(string); if(string == "Record") { StartRecordingToFile(); m_RecButton.SetWindowText("Stop"); } else { StopRecordingToFile(); m_RecButton.SetWindowText("Record"); } } But I get this error in numerous places: error C2664: 'void CWnd::SetWindowTextW(LPCTSTR)' : cannot convert argument 1 from 'const char [5]

Play PCM data in .NET Framework 2?

蹲街弑〆低调 提交于 2019-12-12 13:10:25
问题 I have a stream of u-Law compressed PCM data I am extracting from a Camera, I need to play this out the speakers? Anybody know how? I've tried decoding the u-Law into normal WAV Data and then use SoundPlayer but it never seems to work! Always SoundPlayer only supports PCM Data? I know the sounds ok, because I have saved it to a file (using a custom createWavHeader method) and iTunes can play it. 回答1: Windows comes with an ACM codec to convert u-law to PCM. You can use NAudio and use the

.wav file length/duration without reading in the file

↘锁芯ラ 提交于 2019-12-12 12:30:55
问题 Is there a way to extract the information about .wav file length/duration without having to read in the file in R? I have thousands of those files and it would take a long time if I had to read in every single one to find its duration. Windows File Explorer gives you and option to turn on the Length field and you can see the file duration, but is there a way to extract that information to be able to use in in R? This is what I tried and would like to avoid doing since reading in tens of

Golang: Read buffered input as signed 16bit ints

随声附和 提交于 2019-12-12 11:27:54
问题 I am trying to read a buffered stream of signed 16 bit integers (wav format), but the bufio.Read method only accepts an array of bytes. My question is a 2-parter: Can I preformat the byte stream into a buffered int16 array? If I can't, whats the best way of post-processing the byte array into int16 array? My initial thought is to use tmp arrays and keep pushing/processing them, but I was curious if there was a more idiomatic way of doing this? package main import ( "bufio" "io" "log" "os/exec

Converting a 32 bit wave form to a 16 bit wave form

為{幸葍}努か 提交于 2019-12-12 09:09:09
问题 I've been capturing audio using the loopback capture mode. The captured waveform is a 32 bit waveform. I'm struggling with converting this to a 16 bit waveform so encoders like lame can deal with it (it says Unsupported data format: 0x0003). I've tried shifting the bits (not my strong point) in the wave stream itself from 32 bit to 16 bit but the result still sounds distorted. The Wave32To16Stream class seems to blow up on this case: if (sourceStream.WaveFormat.Encoding != WaveFormatEncoding

Send audio over skype call

一曲冷凌霜 提交于 2019-12-12 09:04:40
问题 I'm trying to send an audio file (or directly audio over current input device for skype) when I click a button on a windows form. I found some links but all references appear to be broken and I'm going mad on how to work with it. I already manage to connect to skype api and use it (I already use it for other projects and it's working well), but I really can't send any audio over input audio stream. Any suggestion will be appreciated. Current code: using System; using System.Collections

how to record anything from soundcards?

天大地大妈咪最大 提交于 2019-12-12 08:17:52
问题 i would like to record any sounds produced in my soundcard. please help, where i can get a freeware component or commercial(trial). delphi7/2009 回答1: I have very good experience with the BASS audio library API. Here is a forum thread with C# example, but since the BASS API is procedural and there is a good Delphi API interface, it translates pretty OK. --jeroen 回答2: http://blogs.msdn.com/b/matthew_van_eerde/archive/2008/12/16/sample-wasapi-loopback-capture-record-what-you-hear.aspx might help

Is it correct to assume that floating-point samples in a WAV or AIFF file will be normalized?

北慕城南 提交于 2019-12-12 07:44:23
问题 Say I have a program that reads a .WAV or .AIFF file, and the file's audio is encoded as floating-point sample-values. Is it correct for my program to assume that any well-formed (floating-point-based) .WAV or .AIFF file will contain sample values only in the range [-1.0f,+1.0f]? I couldn't find anything in the WAV or AIFF specifications that addresses this point. And if that is not a valid assumption, how can one know what the full dynamic range of the audio in the file was intended to be?

Get byte stream from an audio file?

偶尔善良 提交于 2019-12-12 04:54:47
问题 Is there any way to get audio stream from an audio file (wav file in particular) in Java? I am trying to get the stream of a particular interval i.e from startTime to endTime where startTime is not zero. For example, to get the audio stream from 5 sec to 10 sec (5 sec duration) of a 20 sec long audio file. How to do that? 回答1: You can do this with the standard Java sound library: javax.sound.sampled. Reading .wav files has been well covered here, as well as how to convert bytes to the

Decode audio stream channels to multiple wavs using ffmpeg?

心已入冬 提交于 2019-12-12 03:16:24
问题 My goal is to decode an ac3 from avi to multiple wavs - one for each channel, using ffmpeg. Using ffmpeg.exe -i the.avi -c:a copy the.ac3 the.wav would decode it to a single wav, and typing the.wavs won't help... I know it can be done with other tools, but I want to know how it's achievable with ffmpeg. 回答1: From the docs: You can also extract each channel of an input to specific outputs; the following command extracts two channels of the INPUT audio stream (file 0, stream 0) to the