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.WaveFor mat fmt = new WaveLib.WaveFor mat(44100, 16, 2);
m_Player = new WaveLib.WaveOut Player(-1, fmt, 16384, 3, new WaveLib.BufferF illEventHandler (Filler));
m_Recorder = new WaveLib.WaveInR ecorder(-1, fmt, 16384, 3, new WaveLib.BufferD oneEventHandler (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
2 2567
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
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.
Sign in to post your reply or Sign up for a free account.
Similar topics |
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 SourceDataLine. currently, it does not
play back.
andrewjj20
the play method:
class Player implements Runnable {
public Player() {
|
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.
Arnold Shore
|
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.
Regards,
ajac
|
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 microphone <- the Sound recording source change to
Microphone
C:\> abc.exe line <- the sound recording source change to Line-IN
|
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 this issue.
Thanks
| |
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 help
|
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 that the dll formed is not a
valid managed dll. So, I compiled the project as a static library (.lib) and
used it in a cpp project. I was able to use it successfully this way.
Secondly, I was also unable to find any sound recording library in C#....
|
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 idea where should I start? Do I
need to write a driver for sound card? Is there any tool from Visual
Stuido? Would you like to help me? H e l p !
Regards,
|
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:
1 - synchronize the voice with the text, so that the background color of
each word is hilighted as the voice reads that word.
2 - be able to jump around within the recorded text. For instance if the
user double-clicks a certain sentence - just...
|
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 code originate from a VB 6 application, and I'm trying to use vb
2005. I was having a lot of issues until I saw your post that cleaned
up a lot of the structures and DLL calls in this:
...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |