OutputStreamPtr returns false - cannot figure out why

View: New views
7 Messages — Rating Filter:   Alert me  

OutputStreamPtr returns false - cannot figure out why

by Mats Aubell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users

Re: OutputStreamPtr returns false - cannot figure outwhy

by Mats Aubell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It should say OpenSound, not WinMM in the code. My apologies.

-----Opprinnelig melding-----
Fra: audiere-users-bounces@...
[mailto:audiere-users-bounces@...] På vegne av Mats Aubell
Sendt: 29. mai 2006 15:01
Til: audiere-users@...
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-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users




_______________________________________________
Audiere-users mailing list
Audiere-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users

Re: OutputStreamPtr returns false - cannot figureoutwhy

by GeomanNL :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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" <matsemann@...>
To: <audiere-users@...>
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-bounces@...
[mailto:audiere-users-bounces@...] På vegne av Mats Aubell
Sendt: 29. mai 2006 15:01
Til: audiere-users@...
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-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users




_______________________________________________
Audiere-users mailing list
Audiere-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users



_______________________________________________
Audiere-users mailing list
Audiere-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users

Re: OutputStreamPtr returns false - cannotfigureoutwhy

by Mats Aubell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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-bounces@...
[mailto:audiere-users-bounces@...] På vegne av GeomanNL
Sendt: 29. mai 2006 15:32
Til: audiere-users@...
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" <matsemann@...>
To: <audiere-users@...>
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-bounces@...
[mailto:audiere-users-bounces@...] På vegne av Mats Aubell
Sendt: 29. mai 2006 15:01
Til: audiere-users@...
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-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users




_______________________________________________
Audiere-users mailing list
Audiere-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users



_______________________________________________
Audiere-users mailing list
Audiere-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users




_______________________________________________
Audiere-users mailing list
Audiere-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users

Re: OutputStreamPtr returns false -cannotfigureoutwhy

by GeomanNL :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

the != is not correct (you should use ==) in
  if(device!=NULL) cout << "device is null" << endl;


----- Original Message -----
From: "Mats Aubell" <matsemann@...>
To: <audiere-users@...>
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-bounces@...
[mailto:audiere-users-bounces@...] På vegne av GeomanNL
Sendt: 29. mai 2006 15:32
Til: audiere-users@...
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" <matsemann@...>
To: <audiere-users@...>
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-bounces@...
[mailto:audiere-users-bounces@...] På vegne av Mats Aubell
Sendt: 29. mai 2006 15:01
Til: audiere-users@...
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-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users




_______________________________________________
Audiere-users mailing list
Audiere-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users



_______________________________________________
Audiere-users mailing list
Audiere-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users




_______________________________________________
Audiere-users mailing list
Audiere-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users



_______________________________________________
Audiere-users mailing list
Audiere-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users

Re: OutputStreamPtr returns false-cannotfigureoutwhy

by Mats Aubell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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-bounces@...
[mailto:audiere-users-bounces@...] På vegne av GeomanNL
Sendt: 29. mai 2006 15:56
Til: audiere-users@...
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" <matsemann@...>
To: <audiere-users@...>
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-bounces@...
[mailto:audiere-users-bounces@...] På vegne av GeomanNL
Sendt: 29. mai 2006 15:32
Til: audiere-users@...
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" <matsemann@...>
To: <audiere-users@...>
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-bounces@...
[mailto:audiere-users-bounces@...] På vegne av Mats Aubell
Sendt: 29. mai 2006 15:01
Til: audiere-users@...
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-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users




_______________________________________________
Audiere-users mailing list
Audiere-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users



_______________________________________________
Audiere-users mailing list
Audiere-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users




_______________________________________________
Audiere-users mailing list
Audiere-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users



_______________________________________________
Audiere-users mailing list
Audiere-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users




_______________________________________________
Audiere-users mailing list
Audiere-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users

Re: OutputStreamPtr returns false-cannotfigureoutwhy

by Enno Rehling :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mats Aubell wrote:
> if(sound!=NULL)sound->play; else cout << "sound is null" <<
> endl;

Try sound->play();

Enno.
--
A: Because it disturbs the logical flow of a message.
Q: Why is top posting a sloppy form of writing?



_______________________________________________
Audiere-users mailing list
Audiere-users@...
https://lists.sourceforge.net/lists/listinfo/audiere-users