FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Pocket PC SndPlaySound() en Windos Mobile 6
Posts: 144
Joined: Sun Dec 18, 2005 03:18 PM
SndPlaySound() en Windos Mobile 6
Posted: Wed Jul 16, 2008 07:20 AM
Hola atodos.
Este código en un Smartphone con WM6, no suena la musica.
FUNCTION SuenaWav()
 sndPlaySound( CURDIR() + "\TEST.WAV", nOr( SND_ASYNC, SND_LOOP, SND_NOSTOP, SND_FILENAME ) )
  		
RETURN .t.

HB_FUNC( SNDPLAYSOUND ) 
{ 
    LPWSTR AnsiToWide( LPSTR ); 

    LPWSTR pW = AnsiToWide( hb_parc( 1 ) ); 
    hb_retnl( sndPlaySound( pW, hb_parni( 2 ) ) ); 
    hb_xfree( pW ); 
}


Probado en una Pda con PPC2003 funciona correctamente.
Alguien sabe donde puede estar el problema.

Gracias.
Saludos

Salvador
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
SndPlaySound() en Windos Mobile 6
Posted: Wed Jul 16, 2008 08:55 AM

Salvador,

sndPlaySound() devuelve un valor lógico indicando si se ha podido reproducir el fichero.

Cambia hb_retnl() por hb_retl() y comprueba desde el PRG el valor que te devuelve:

MsgInfo( sndPlaySound( CURDIR() + "\TEST.WAV", nOr( SND_ASYNC, SND_LOOP, SND_NOSTOP, SND_FILENAME ) ) )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
SndPlaySound() en Windos Mobile 6
Posted: Wed Jul 16, 2008 08:57 AM

Salvador,

Tambien puedes comprobar, aunque sea obvio, que el fichero esté ahí:

MsgInfo( File( CURDIR() + "\TEST.WAV" ) )

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion