I'm speechless... (and I need some fresh air apparently). device is ok.
sound still returns false.
Proper code:
AudioDevicePtr device(OpenDevice());
if(device==NULL) cout << "devicce is null" << endl;
OutputStreamPtr sound(OpenSound(device,"zzap.wav", false));
if(sound!=NULL)sound->play; else cout << "sound is null" <<
endl;
Sorry for the mess!
-----Opprinnelig melding-----
Fra: audiere-users-***@lists.sourceforge.net
[mailto:audiere-users-***@lists.sourceforge.net] På vegne av GeomanNL
Sendt: 29. mai 2006 15:56
Til: audiere-***@lists.sourceforge.net
Emne: Re: [Audiere-users] OutputStreamPtr returns false-cannotfigureoutwhy
the != is not correct (you should use ==) in
if(device!=NULL) cout << "device is null" << endl;
----- Original Message -----
From: "Mats Aubell" <***@c2i.net>
To: <audiere-***@lists.sourceforge.net>
Sent: Monday, May 29, 2006 4:49 PM
Subject: Re: [Audiere-users] OutputStreamPtr returns
false -cannotfigureoutwhy
Sorry again, some hasty written code there, but if I set it like this:
if(device!=NULL) cout << "device is null" << endl;
It also informs me that that AudioDevicePtr device(OpenDevice()); returns
false, so this is probably the main problem.
My head may have taken some permanent damage... :)
-----Opprinnelig melding-----
Fra: audiere-users-***@lists.sourceforge.net
[mailto:audiere-users-***@lists.sourceforge.net] På vegne av GeomanNL
Sendt: 29. mai 2006 15:32
Til: audiere-***@lists.sourceforge.net
Emne: Re: [Audiere-users] OutputStreamPtr returns false - cannotfigureoutwhy
I got similar code, it looks okay, except it looks like you set device to
NULL in your code, namely here.
if(device=NULL)
----- Original Message -----
From: "Mats Aubell" <***@c2i.net>
To: <audiere-***@lists.sourceforge.net>
Sent: Monday, May 29, 2006 4:05 PM
Subject: Re: [Audiere-users] OutputStreamPtr returns false - cannot
figureoutwhy
It should say OpenSound, not WinMM in the code. My apologies.
-----Opprinnelig melding-----
Fra: audiere-users-***@lists.sourceforge.net
[mailto:audiere-users-***@lists.sourceforge.net] På vegne av Mats Aubell
Sendt: 29. mai 2006 15:01
Til: audiere-***@lists.sourceforge.net
Emne: [Audiere-users] OutputStreamPtr returns false - cannot figure outwhy
Hi all,
This library is just what I've been looking for with its simplicity and yet
so powerful. However, I've been banging my head at the desk for some time
now, because I can't even get the sample code to work.
My main code:
AudioDevicePtr device(OpenDevice());
if(device=NULL) cout << "device is null" << endl;
OutputStreamPtr sound(WinMM(device,"zzap.wav", false));
if(sound!=NULL)sound->play; else cout << "sound is null" <<
endl;
Sound returns null, and I don't know why.
The file is in the project folder, have also tried the whole C:\Documents
and Settings\Mats Aubell\..... path, no effect.
I have tried opening it with the wxPlayer, everything plays as it should.
I'm on WinXP using Visual Studio 2003.
Thanks for any help! I'll continue to bang my head into solid objects for a
while :)
Mats Aubell
_______________________________________________
Audiere-users mailing list
Audiere-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/audiere-users
_______________________________________________
Audiere-users mailing list
Audiere-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/audiere-users
_______________________________________________
Audiere-users mailing list
Audiere-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/audiere-users