Playing Wave File From Resource Dll Using DirectSound?

Aug 6, 2011

I have used DirectSound to play a wave file in my application using the function CreateSoundBufferFromFile. It works perfectly.Now I want to play files from a resource dll file. I have created 1n2v32.dll file having nearly 100 small wave files named 1,2,3... I can play them using LoadLibraryEx, PlaySound & FreeLibrary.Now, I am trying to use CreateSoundBufferFromResource function from DirectSound api to play these files. I get Run-time error '432': File name or class name not found during Automation operation I used the following code to create the buffer.

Set LDSB = LDS.CreateSoundBufferFromResource(App.Path & "1n2v32.dll", "14", BufferDesc, gw)

View 6 Replies


ADVERTISEMENT

Playing Multiple And Overlapping Wave Files?

Jan 30, 2012

I'm trying to write a virtual piano program. Each key plays a sound from the resources directory.How do i play two(or more) sounds at the same time if ex two keys are pressed. Or start playing another sound while one is still playing.

View 2 Replies

Game Programming :: Playing Wave Files In An Application

Nov 20, 2008

I have a program that speaks wave files. This works problemless with the Soundplayer class with the following code:

Sub MyPlayWav(ByVal WavFileName As String, ByVal StartPos As Long, ByVal EndPos As Long)
Dim wp as new SoundPlayer
wp.SoundLocation = WavFileName
wp.Play
End sub

The soundplayer does however not seem to have a method to play the wave from position StartPos to position EndPos and achieving just that would mean quite a reduction in downloads of these files.

The soundplayer does have a stream object, and that does have a seek method, suggesting that there might be a way to accomplish this, but how?

I plan to include other media files as I am developping the project, and I guess I will be confronted with the same problem.

View 2 Replies

VS 2005 Playing *.xm From Resource?

Aug 1, 2009

i am using bass.net.dll for playing a *.xm file in my application now problem is my *.xm file is in resource and the function bass.bass_musicload(<file name as string>,........) not support direct playing from resource.So is there any method to play it from resource,

View 3 Replies

.net - BSOD While Playing A Sound Resource?

Sep 21, 2010

I have a VB.NET application that crashes on a client's computer with a BSOD error... KERNEL_DATA_INPAGE_ERROR.This error occurs at a point where my program does two things:

Locks the computer
Plays a sound in BackgroundLoop mode

For locking the work station, I am just using this:

<DllImport("user32")> _
Public Shared Sub LockWorkStation()
End Sub

For playing the sound, I am doing this:

My.Computer.Audio.Play(My.Resources.ResourceManager.GetStream("somesound"), AudioPlayMode.BackgroundLoop)

Now, this sound loops until the user logs back in. My software detects the session state switch and stops playing the sound. Sometimes when I log back in, the sound card plays garbage data for a split second, instead of the rest of the audio buffer. I get the impression that this has something to do with session switching.Could my client be having an issue where there is memory corruption occurring at the point of locking the computer?I apologize for the vagueness of this post... I am not sure where to begin as I cannot reproduce the problem myself.

Edit: If the sound is left to play on its own, even without locking the computer, eventually the computer will lock up and then bluescreen. Playing the sound while locking at the same causes it to happen sooner.

Edit #2: So I've seen it fail now. The sound loop starts playing correctly but quickly switches to looping of garbage data. It's as if it is just reading a random location in memory and looping that. Very strange behavior!

View 1 Replies

[2005] Directsound Tutorial - Stream A WAV File, Not Just Play It?

Feb 14, 2009

I was wondering if anyone could point me to a really good tutorial on Directsound.I don't know if trying to digest an API is a good thing for a beginner but I really need something that has a beginner in mind.I especially liked some of the Microsoft video tutorials on VB.NET so perhaps they offer some on Directsound?The goal is to stream a WAV file, (not just "play it") and I want to LEARN the process.

View 3 Replies

Icons From Resource File - Use Files Inside Of Resource File In Apps?

Feb 26, 2011

So i created resource file New --> new file --> Native Resource Template Then added icons with custom id, like "x", "u_100", .. so i understand, what the files (in my case icons) is.. And i saved as 32-bit resource file (*.res) So i have a question, how can i use these files inside of resource file in my apps? i know how to add icons in to my app.. Me.Icon = New Icon(C:/icon.ico)

View 6 Replies

What's In A Wave File

Jun 17, 2009

I am trying to convert a mp3 to wav and I need to know...What is the very first thing you see when you open a wave file up? the 2nd, the 3rd, 4th and so on. Is it the riff header or the riff header contents(ID, size, Type). I need this info for a Regex string that would look something like this...

'Frame/MaxFrame (PercentDone%) | CPU time/estim | REAL time/estim | play/CPU | ETA
Private Shared _regLine As Regex = New Regex( _
"(d+)/(d+)D+(d+)D+([d:]+)D+([d:]+)D+([d:]+)D+([d:]+)D+([d.]+)D+([d:]+)"

[code]....

I am executing lame.exe from a process.Start command.VB 6.0, VBExprss, ASP,Net, & Gaming

View 9 Replies

How To Get Wave File Information

May 26, 2010

how to get the wave file information in vb.net like frequency,no of channels etc from wave file

View 3 Replies

Wave File Won't Play?

Oct 4, 2008

So, I re did my project in VB.NEt instead of C#. So, I put all the sound files in the resource files. I made a routine to play the sound file but it says that to make sure the sound file exists. Which it does because it played in the resource manager.Here's the sub routine to play the sound:

Dim sndplayer As New Media.SoundPlayer
Public Sub TestSound(ByVal snd As String)
My.Computer.Audio.Play(snd)

[code].....

View 3 Replies

Way To Show Wave From Wav File

Dec 16, 2010

i'm needing a control, or a way to show the wave forms from wav file.

View 1 Replies

Convert Data To Wave File

Jul 29, 2009

i have a 2 dimensional array with beep codes, first column is frequency and second column is duration. i can save and open the data to a text file, which looks like this:

[Code]...

my program can play them just fine, but i would like to save them to a .wav file so any audio program can read them, i'm using VB.net Express 2008

View 3 Replies

Converting A Wave File To Binary?

Jan 24, 2009

Iam working in a project need converting a wave file to binary..converting a file of such format(wave) to binary text in asp.net? I need that cause i want to cut the original file to many files, and add additional parts of the same type to them and combine them together in a one file again..

View 2 Replies

Draw A Waveform Of A Wave File?

Aug 28, 2011

how to draw a waveform represenatation of a wave a wavefile and/or an MP3? Even better, can it be drawn in real-time while the file is playng?

View 8 Replies

Finding Wave File Attributes?

Jun 22, 2009

I am trying to figure out the numSamples in this:The canonical WAVE format starts with the RIFF header:

0 4 ChunkID Contains the letters "RIFF" in ASCII form
(0x52494646 big-endian form).
4 4 ChunkSize 36 + SubChunk2Size, or more precisely:

[code]....

This works fine for getting the wave file info, It just doesn't display the numSamples which I need.

View 3 Replies

Use A Relative Path To Play A WAVE File?

Aug 6, 2010

Firstly, I'm a Chinese Beginner of Visual Basic. I try my best to express my worries and demands. If anything is vague, I want to design a program like this: when clicking the button, the computer will play certain sound. Like this:(VB 2010) Private Sub con_sndplay_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles PLAY.Click

View 3 Replies

VS 2008 MciSendString Save Wave File

Jul 19, 2009

I have a created a small application that records and plays audio. However, my application needs to save the wave file to the application data directory on the users computer.The mciSendString takes a C style string as a parameter and has to be in 8.3 format. However, my problem is I can't get it to save. And what is strange is sometime it does and sometimes it doesn't. However, most of the time it failes. However, if I save directly to the C drive it works first time everything. I have used 3 different methods that I have coded below. The error number that I get when it fails is 286."The file was not saved. Make sure your system has sufficient disk space or has an intact network connection".[code]

View 1 Replies

C# - Read A Wave File From IsolatedStorage In Windows Phone?

Mar 3, 2012

I would like to read a WAV file I download in isolatedStorage; actually I use a media Element on my Window which I set the source from the IsolatedStorageFileStream

Dim IsoRead As New IsolatedStorage.IsolatedStorageFileStream(MsgFN, FileMode.Open, Store)
Mainwindow.Playingsound.SetSource(IsoRead)
Mainwindow.Playingsound.Play()

Bu it seems not Working, I dont hear anaything in the emulator.

View 1 Replies

Resource File / - Separate Resource DLL ?

Feb 5, 2010

I have a resource file that I include in my shared code library that has all of my re-usable classes in it (all the resources go into their own namespace). Now, what is the best practice regarding resources... should I include them in the same DLL, or should I have a seperate resource DLL and/or are there any benefits from seperating them out into their own file.

View 8 Replies

Write A Program To Alter The Pitch Of A Wave File To A Specified Frequency And Play The Altered Wav Back

Dec 23, 2011

links that may point me in the right direction to accomplish the task listed in the title,

View 5 Replies

WAV File Play - Detect When A Sound File (WAV) Stops Playing?

Feb 25, 2009

For stopping by, is there a way to detect when a sound file (WAV) stops playing?

e.g.> There is a FORM with a PLAY button on which is coded to play a WAV file. But how does VB detect when the WAV file has finished playing?

Here is the code I have on the PLAY button

My.Computer.Audio.Play("test.wav", AudioPlayMode.BackgroundLoop)

View 3 Replies

Use The Time-code Data From A Wav File Or Know When A Wav File Is Playing?

Sep 18, 2009

My program turns on and off external relays from the parallel port. I need to find a way to activate the relay only while a wav file is playing and de-activate the relay when the wav file stops playing.

[Code]...

View 5 Replies

Playing A PLS File?

Jul 23, 2009

Is it possible to download a pls file and play it? it's basically streaming music, and I need to know if I can develop a way to play it through an application.

View 3 Replies

Playing With Bat File And Exe

Jul 19, 2009

i need to decrypt a file by calling an exe.when i call this i need to supply password to that exe how can i supply the password programtically [code]this is what iam using to decript that file named V4933001.txt when i use this code a command promt will be poped up there i need to supply password.but i need to supply that password programatically

View 2 Replies

Directsound - How To Play Wavs

Sep 6, 2011

i am new to directsound. I was wondering if someone could point to a resource that explains how to load wav files and play them using directsound. I found one webpage that explains how to load wavs and play them but you load them by clicking a button and searching a window for the file; what I need is programmatic loading. I can't use simpler methods to play the wavs because I need multiple sounds playing at once and very fast execution times. If it isn't too difficult, perhaps someone could post some code.

View 4 Replies

DirectSound Capturing Microphone In VB

Dec 18, 2010

I'm currently trying to Capture through DirectSound, I've been trying toying around with WaveLib(Ported to VB) but this is very confusing. Anyway, I cant figure out how I am supposed to do this and would like some assistance. The end goal of this project is to: Record Microphone > Encode with Speex Codec > Send over UDP > Decode > Play on Speakers

View 3 Replies

VS 2010 Reference To DirectSound?

Jun 18, 2011

I am trying to follow some tutorials on using DirectSound in VB.NET and I need a reference to Microsoft.DirectX.DirectSound in my project. I have downloaded and installed the Microsoft DirectX SDK (June 2010) but after a restart I have no additional .NET references available to add to my project. I must be doing something really dumb

View 2 Replies

Get Media Playing Now Playing Using Sendmessege / Wmp.dll?

Jan 22, 2010

How I can get the Media playing now playing using Sendmessege or wmp.dll?

View 5 Replies

Playing A Mp3 File What Is In The Resources?

Jan 8, 2008

i need the code for playing a mp3 file what is in the resources. i don't have a clue of where to start. i've tried so many times but i always get an error.

View 12 Replies

Playing One .wav File Without Stopping The Other

Nov 29, 2007

I'm currently programming a music software which plays notes which are listed. as timer ticks, the notes change and so it plays a different *.wav file. The problem now is that the previous sounds stops when a new sound starts. i want them to overlap each other until each one has finished. Code: my.computer.audio.play("file.wav")

View 30 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved