473,385 Members | 1,843 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,385 software developers and data experts.

Infamous Sound

I've been reading up on how to insert sound into a program,. but I just can't understand it.
For example:
I have a sound file saved on my desktop, My program is C# Windows Game, a basic alien shooter. When the user hits the space bar and fires, I'd like to run the sound file, whether it be inserted in the resources or not. which ever works.
I'll insert my code if need be.
Jul 2 '07 #1
3 980
weaknessforcats
9,208 Expert Mod 8TB
Moving this to the .NET forum.
Jul 2 '07 #2
Yeah thanks for the help guys -_-
Luckily I solved it myself
Jul 16 '07 #3
Plater
7,872 Expert 4TB
Your message musta got lost. A lot of people post a lot of questions.

I am fairly certain that you need to use a DLLImport to play the sounds. It's pretty simple, a quick google search woulda given you all you needed.
Jul 16 '07 #4

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

Similar topics

1
by: Marco Krechting | last post by:
Hi All, I have a database with the timer function set to warn the user that arecord is due to expire. Is there a Win API that I can use so a loud warning will go off. Not this simpel beep in...
4
by: Robert Gravereaux | last post by:
I'm putting together a C# .Net forms project on win2k. The application requires some sort of horn sound. I've never implemented any audio in .Net, so I'm not sure how best to accomplish this. ...
1
by: Lam | last post by:
how can I play sound file in a .aspx page written in C#? I try to use the code like the following. But whenI call the play function play("sound.wav", this.SND_ASYNC) my computer give out "be"...
4
by: Larry Serflaten | last post by:
I'm adding a bit of sound to a simple game I've got going, and I want to have several sounds on at the same time, so I go looking to use the MCISendString commands and find they CRASH MY COMPUTER...
6
by: laredotornado | last post by:
Hi, Is there a cross-browser way to play short (< 25K) sound files without spawning new windows or embedding any visual controls on the page? I would like to click a button and hear my short...
6
by: =?Utf-8?B?VmVybm9uIFBlcHBlcnM=?= | last post by:
I have an application that is designed for using with a bar code scanner. I want the user to know that the scan was complete and the data was entered, so I am playing a system sound after data...
14
by: change | last post by:
scribes I am trying to run the infamous hello world script in java and when i compile in dos prompt using the folling code "javac helloworld.java" i get the error message javac is not recognised...
4
by: kid joe | last post by:
Hello I've got interested in learning some basic sound programming bits in C... mainly I want to know how to go about accessing the sound devices - reading from them mainly - in windows and...
8
by: chromis | last post by:
Hi, I've been struggling to get sounds to work with attachSound when the sounds are stored in a swf loaded into another swf. I came across a post on a forum which supposedly explains how to to do...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...

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.