|
-
Oct 21st, 2002, 12:14 AM
#1
Thread Starter
Hyperactive Member
How to create sounds in C#?
How to create sounds in C#?
Any idea of class, that can be used to crate sounds?
-
Oct 21st, 2002, 12:34 PM
#2
PowerPoster
Do you want to play wav files, mp3 files, etc..?
-
Oct 21st, 2002, 09:21 PM
#3
Thread Starter
Hyperactive Member
No
I want to design a small program that can produce sounds.
I am thinking of a class that when u give the frequency produce the sound…
Or something like that…
-
Oct 22nd, 2002, 05:42 PM
#4
PowerPoster
I have no idea. Wish I did, it would be pretty cool. I am sure there are ways, just none that I know. Sorry.
-
Oct 23rd, 2002, 07:35 AM
#5
yay gay
i already have though of that...it is the only thing that the framework is missing: sound! maybe with directx or something..
-
Oct 23rd, 2002, 01:06 PM
#6
Hyperactive Member
Direct access to the sound card might be a bit limited from the dot net framework, but nothing is stopping you from creating a wav file and playing that with windows media player. You can use the player through COM Interop.
Or, you might want to look at the WaveIn/OutXXX functions in the platform SDK.
If you've used DirectX, then you might find the DirectSound functions pretty straight forward.
-scott
he he he
-
Oct 23rd, 2002, 02:40 PM
#7
Hyperactive Member
Anyone know how to play mp3's then? I would love to make a C# mp3 player.
..::[ kleptos]::..
- Database Administrator (MSSQL 2000)
- Application Developer (C#)
- Web Developer (ASP.NET)

-
Oct 23rd, 2002, 03:21 PM
#8
Hyperactive Member
Playing an MP3 is easy if you've got Windows Media Player installed (like MS would let you not install it ).
Add the Windows Media Player ActiveX control to your toolbox and then drop it onto a form in your Winform project...
This code will play a song:
PHP Code:
axMediaPlayer1.FileName = FileNameAndPathToMP3;
axMediaPlayer1.Play();
-scott
he he he
-
Oct 23rd, 2002, 03:48 PM
#9
Hyperactive Member
..::[ kleptos]::..
- Database Administrator (MSSQL 2000)
- Application Developer (C#)
- Web Developer (ASP.NET)

-
Nov 7th, 2002, 10:57 PM
#10
Thread Starter
Hyperactive Member
-
Nov 8th, 2002, 10:44 AM
#11
Seems only through media player.
The .NET framework has nearly no multimedia capabilities. This will change with the release of DirectX 9, which will provide a .NET interface (just as DirectX 7 finally provided a VB interface).
With DirectX 9 you will then be able to do advanced (fast) 2D, 3D, Sound and Music programming, as well as using DirectShow to display movies or play MP3s, DirectPlay for network connections beyond the encapsulated protocols of the .NET framework etc.
My opinion? The high performance of DirectX is nice for .NET, but that won't make it any more useful for games, and it's sad that the only multimedia part of the CLR is non-portable.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Nov 11th, 2002, 05:45 AM
#12
Thread Starter
Hyperactive Member
-
Nov 12th, 2002, 04:25 PM
#13
Hyperactive Member
bump yourself...
there's no easy way to do what you are asking.
you might need to look into APIs from SoundBlaster etc. or you can create the WAV file yourself and play it via the media player.
-scott
he he he
-
Dec 26th, 2010, 05:00 AM
#14
Re: How to create sounds in C#?
Maybe al little late (8 years) but you could use
vb Code:
Console.Beep(frequency,duration)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|