|
I'm sorry that I'm pushing my help and all, but what would I do in the catch part, to find out? I added the code, except for that.
- I love D-flat!
|
|
|
|
|
I tried it without code in catch, and it doesn't stop the program and give me an error, but I don't hear sound.
- I love D-flat!
|
|
|
|
|
I got the error code from "ex". 2147287038
- I love D-flat!
|
|
|
|
|
MasterSharp wrote: it doesn't stop the program and give me an error
That's probably because you're "eating" the exception (i.e. catching it but not doing anything about the fact that an exception was thrown).
/ravi
|
|
|
|
|
MasterSharp wrote: what would I do in the catch part
The simplest thing to do would be to display a message box if an exception is thrown, eg:
try {
wave = new DirectSound.SecondaryBuffer("C:\\laser1.wav", sound);
}
catch (SoundException ex) {
MessageBox.Show (ex.Message);
}
Also make sure the file C:\\laser1.wav exists.
/ravi
|
|
|
|
|
Ok, so now that we have that done, how could we get the sound to play? I tried severl wave files I see listed in my files, and nothing works. I just want some sounds!
- I love D-flat!
|
|
|
|
|
Was an exception thrown? If so, what's its message?
/ravi
|
|
|
|
|
The error is:
"error in the application - (that big number from a post or 2 ago, Unknown)
string filename, bufferdescription, Device parent
- I love D-flat!
|
|
|
|
|
Sorry, I have no idea what that means. The DirectSound tutorials at this site may help you get on your way. See this[^] section.
/ravi
|
|
|
|
|
Okay; I've gotten the Error t oshow and things. What now? And I really am sorry if I'm pushy.
- I love D-flat!
|
|
|
|
|
MasterSharp wrote: What now?
Hard to say without knowing what the error message is. I'm not psychic.
/ravi
|
|
|
|
|
MasterSharp wrote: I just want some sounds!
You might want to read this[^] article.
MasterSharp wrote: I love D-flat!
May I ask why? Also, did you mean the note or a chord. If so, which one? (I'm a fan of the Em, Am, B7 sequence).
/ravi
|
|
|
|
|
|
Hey. Thanks for the article and trying to help my challenged self. Thanks again!
- I love D-flat!
|
|
|
|
|
MasterSharp wrote: I meant C#.
Ah, that makes sense.
/ravi
|
|
|
|
|
Okay, now I've gone and checked out that article AND a few more, yet, I get the same error? Is it the wrong version od DirectSound, stupid mistakes, mistyping the filepath? I'm getting fed up.
- I love D-flat!
|
|
|
|
|
It's plain that we don't know why it's not working. The number you're getting back is a HRESULT, you could google it and see if you find any info. VC6 came with a tool where you could enter the number and get more meaningful info, but that rarely worked, and I doubt you have it. Did you try a different file, such as an mp3 ?
Also, if directsound is part of directshow, it's not in the DirectX sdk, it's in the platform SDK.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi all,
does it possible to create databindings between a control and a variable/properties of my class.
Thanx
daavena.
|
|
|
|
|
Did you try searching Google[^] before asking your question?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi Paul,
Yes I did. I put in the goole wrong keyword.
Sorry.
Thanks.
daavena
|
|
|
|
|
I was wondering if anyone had code to read contents inside an .iso file?
I am toying with the Nero SDK now and maybe it can do it. However, until then if anyone can suggest a way to do it I would be greatly appreciative.
Enjoy your weekend.
Steve Welborn
Software Engineer
Inrange Consulting
|
|
|
|
|
Are you still having trouble with this?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Yes I am. I have been googling and have came up with a few programs that do what I want to do. However, I would like to do this on my own..for learning purposes.
The main thing I am trying to accompolish is being able to view an iso's contents and display them in a listview. I already have an application that will extract an iso, just not view its contents.
Thanks for the reply and time.
Steve
Steve Welborn
Software Engineer
Inrange Consulting
|
|
|
|
|
How it is possible to convert from a base-class:
public class Test : Object
{
....
}
....
Object obj = new Object();
Test test = (Test)obj;
|
|
|
|
|
You can't do this. Object is the base class and Test the subclass. The Object type knows nothing about the Test type, so you can't create a new instance of Object and cast to Test .
Creating a new instance of Test and casting to Object is OK because Test derives from Object and therefore inherits its attributes and behaviour.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|