473,387 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Sound Recording

Hi All, Please i found this tutorial on http://www.codeproject.com/cs/media/cswavrec.asp and i run it, but its bringing this error when i click on start:
private void Start()
{
Stop();
try
{
WaveLib.WaveFormat fmt = new WaveLib.WaveFormat(44100, 16, 2);
m_Player = new WaveLib.WaveOutPlayer(-1, fmt, 16384, 3, new WaveLib.BufferFillEventHandler(Filler));
m_Recorder = new WaveLib.WaveInRecorder(-1, fmt, 16384, 3, new WaveLib.BufferDoneEventHandler(DataArrived));
}
catch
{
Stop();
throw; -- This is where the error is: Object reference not set to an instance of an object
}
}

Please what can i do. Any help will be appreciated.

Thanks

Timotech
Oct 7 '11 #1
2 2558
I saw in another post, that this actual code doesn't work on x64 systems, so i tried it on x32 it did not bring any error.

Please how can i modify it, such that i can select audio devices instead of just click on start. Also, how can i make it work on x64 systems.

Thanks
Oct 7 '11 #2
Anyway, what i finally did to make it work was to target the application to run on an x86 system in my project build properties, then it started running.
Oct 10 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Josh | last post by:
I am having a problem with sound in my program, it takes information from a TargetDataLine, put's it in a temporary file, then takes it back out of the temporary file and plays it using a...
0
by: A. Shore | last post by:
Subject says it all. Yes, I'm aware of the security implications and potential data volume, but I'm satisfied that I have countermeasures available to me on these risks. Thanks, pipple. ...
0
by: ajac | last post by:
In the windows xp system the sound recording system give us only 1 minute of recording time. I would like to get the "recording time Length " to the maximum. please let me know Urgently. ...
6
by: Dovelet | last post by:
Hi all, I would like to write DOS program to change the MS Windows Sound Recording source. When I run it with the parameter, it will change the recording source as follow: C:\> abc.exe...
4
by: Michael | last post by:
Hello, I want to create a program that records a sound track from the microphone, and save it into a file, but I don't know how and where to begin, Please give me any piece of information about...
4
by: Michael | last post by:
Hello, I want to create a program that records a sound track from the microphone, and save it into a file. Can anybody tell me please how do I get the audio from the microphone? thanks for your...
1
by: Nikhil Aggarwal | last post by:
I have to make an mp3 sound recorder to record through mike. So, I plan to use lame as mp3 encoder which is written in C. I am unable to import its dll in C# project as a reference because it says...
3
by: larry | last post by:
Hi, my friends, My boss asked me to use sound card to do analog to digital conversion for my application. I know when we record sound, sound card changes anolog signal to digital file. I have no...
4
by: jdcharbonneau | last post by:
I am working on a foreign language learning program. (C# DotNet V2) I have some written text, and a recording of a native speaker speaking that text. I would like to be able to do the following: ...
8
by: jer | last post by:
I've noticed you've helped a lot of people that were trying to do sound recording through VB.net. I'm searched all over the internet, and I'm still having problems write sound to a wav file. My...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.