lame

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

心已入冬 提交于 2019-12-04 17:08:00
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.IeeeFloat) throw new ApplicationException("Only 32 bit Floating point supported"); Ideally I would want

Convert WAV to MP3 using LAME from PHP

为君一笑 提交于 2019-12-04 08:50:10
I have WAV data that I'd like to convert to MP3 on the fly with a PHP script. The WAV file originates with the script, so it does not start out as a file. I can run something like this: exec( "lame --cbr -b 32k in.wav out.mp3" ); But this will require that I first write in.wav to disk, read out.mp3 from disk, and then clean up when I'm finished. I'd prefer not to do that. Instead, I have the wav file stored in $wav, and I'd like to run this through LAME such that the outputted data is then stored in $mp3. I've seen references to an FFMPEG PHP library, but I'd prefer to avoid having to install

wma audio stream to mp3 stream using NAudio c#

别来无恙 提交于 2019-12-04 07:00:30
问题 My task is to convert wma audio stream to mp3 stream using NAudio and Lame. The below code is working fine with file name but I want it to be done with memory stream. I search in NAudio there is no method for reading wma audio stream. Is it possible with NAudio? public static byte[] ConvertWmaToMp3(uint bitrate = 128) { FileStream fs = new FileStream("..\\sample.wma", FileMode.Open, FileAccess.Read); var ws = new NAudio.WindowsMediaFormat.WMAFileReader(fs.Name); // Setup encoder configuration

How to decode mp3 into wav using lame in C/C++?

狂风中的少年 提交于 2019-12-04 01:06:05
I learned how to encode wav into an mp3 using lame_encode_buffer_interleaved from this question: Is there any LAME c++ wraper\simplifier (working on Linux Mac and Win from pure code)? Now I want to decode the mp3 back into wav. I know there's lame_decode but I don't know how to use it since it requires two pcm buffers ( pcm_l and pcm_r ). I don't understand how to put them together into a well-formed wav file, because I don't really know how they works. Now can someone provide a simple working example on decoding an mp3 into a wav using lame in C/C++? Thanks. Fox32 Take a look into the lame

Invoking JNI functions in Android package name containing underscore

空扰寡人 提交于 2019-12-03 15:09:56
问题 I am trying to implement MP3 encoding in Android using the LAME library following these guides: Lame MP3 Encoder compile for Android http://developer.samsung.com/android/technical-docs/Porting-and-using-LAME-MP3-on-Android-with-JNI However I am getting a java.lang.UnsatisfiedLinkError which I believe might be due to the fact that my package name contains an underscore which it interprets as a full stop . Looking at my code below is this likely this issue and how do I get around that. Or is

Create a silent mp3 from the command line

痞子三分冷 提交于 2019-12-03 12:04:24
问题 I am trying to create a silent / empty mp3 file of (x) seconds using the command line. Quite a simple task I thought! It seems LAME is able to do something like this, but I am unable to find anything that leads to achieving this. Has anyone been able to do something like this? 回答1: Disclaimer: This is a unix-oriented approach (although sox is cross-platform and should get it done on windows only as well). You'll need sox - "the [cross-platform] Swiss Army knife of sound processing programs".

Adding C++ DLL's to a C# project

被刻印的时光 ゝ 提交于 2019-12-03 11:42:43
I'm trying to use the lame_enc.dll file from LAME in a C# project, but adding the thing seems impossible. I keep getting an error that says that a reference could not be added and to please check if the is accessible, a valid assembly or COM component. I have no C++ experience, though I would like to use the functionality. Right now I'm using Process from the .NET framework to call lame.exe and do stuff, but I'd like to know if there's another way. Ranhiru Jude Cooray You have to use P/Invoke to call unmanaged APIs from managed code. You can only add managed assemblies as a reference to a

iOS Swift - Merge and convert .wav files to .mp3

北城以北 提交于 2019-12-03 08:42:55
问题 I want to merge two or more .wav files to one and then convert it to .mp3 and this I would like to done in Swift (or at least to have option to include it to swift project). Merge two .wav files in swift isn't problem. Here is my example Now I don't know how to add lame library to swift project and how to use it (how to change objective c lame code usage syntax to use it in swift). I stuck in swift so I tried Lame library with Objective C. I found example code for converting .caf to .mp3 so I

Invoking JNI functions in Android package name containing underscore

核能气质少年 提交于 2019-12-03 04:54:22
I am trying to implement MP3 encoding in Android using the LAME library following these guides: Lame MP3 Encoder compile for Android http://developer.samsung.com/android/technical-docs/Porting-and-using-LAME-MP3-on-Android-with-JNI However I am getting a java.lang.UnsatisfiedLinkError which I believe might be due to the fact that my package name contains an underscore which it interprets as a full stop . Looking at my code below is this likely this issue and how do I get around that. Or is there something else causing this. Thanks in advance for any help. Record.java : package co.uk.ing

Create a silent mp3 from the command line

旧城冷巷雨未停 提交于 2019-12-03 02:49:54
I am trying to create a silent / empty mp3 file of (x) seconds using the command line. Quite a simple task I thought! It seems LAME is able to do something like this, but I am unable to find anything that leads to achieving this. Has anyone been able to do something like this? miku Disclaimer: This is a unix-oriented approach (although sox is cross-platform and should get it done on windows only as well). You'll need sox - "the [cross-platform] Swiss Army knife of sound processing programs". This wrapper perl script, helps you generate any seconds of silence: http://www.boutell.com/scripts