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
Rahul Choudhary
NA
5
7.8k
My Code
Dec 27 2013 8:53 AM
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
string _FileName = "C:\\Enya.mp3";
byte[] p;
p=File.ReadAllBytes(_FileName);
byte[] Stm = StereoToMono(p);
}
public byte[] StereoToMono(byte[] input)
{
byte[] output = new byte[input.Length / 2];
int outputIndex = 0;
for (int n = 0; n < input.Length; n += 4)
{
// copy in the first 16 bit sample
output[outputIndex++] = input[n];
output[outputIndex++] = input[n + 1];
}
return output;
}
}
}
I now wish this program to run but it shows an error in this line "
byte[] Stm = StereoToMono(p);
"
Reply
Answers (
4
)
how to change focus of textbox when it reaches to maxlength?
how do i play mp3 file from array of bytes