TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Jithu Johncena
NA
3
4.9k
How to change .wav format file bit-rate
Nov 9 2016 7:42 AM
Hi all,
In my application i ahve some .wav format audio files,so here i want to change Bit rate, for that i am using below code
<pre lang="C#">int bitrate;
using (var reader = new WaveFileReader(textBox1.Text))
{
bitrate = reader.WaveFormat.AverageBytesPerSecond * 8;
reader.Dispose();
}
if (bitrate > 128000)
{
using (var reader = new WaveFileReader(textBox1.Text))
{
var newFormat = new WaveFormat(8000, 16, 1);
using (var conversionStream = new WaveFormatConversionStream(newFormat, reader))
{
WaveFileWriter.CreateWaveFile(@"C:\Docs\Files\", conversionStream);
}
}
}</pre>
it is working for some files only, and some files get below error
<pre lang="C#">An unhandled exception of type 'NAudio.MmException' occurred in NAudio.dll
Additional information: AcmNotPossible calling acmStreamOpen</pre>
How can i solve the error ?
--Here i am using Naudio Dll
Reply
Answers (
1
)
SQL-query rank function
SQL urgent need help