• Jueves 2 de Mayo de 2024, 18:54

Autor Tema:  Problema con PlaySound  (Leído 1769 veces)

ruben14

  • Nuevo Miembro
  • *
  • Mensajes: 4
    • Ver Perfil
Problema con PlaySound
« en: Miércoles 24 de Noviembre de 2010, 07:37 »
0
Al poner

Citar
  PlaySound(ExtractFilePath(Application->ExeName)+"\Sound\tap.mp3"),NULL,SND_RESOURCE || SND_ASYNC)

me da el siguiente error:

Cannot Convert 'AnsiString'  to  'Const char *'

Alguna Idea

Gracias

softevolutions

  • Miembro activo
  • **
  • Mensajes: 84
  • Nacionalidad: es
    • Ver Perfil
    • http://www.softevolutions.es
Re: Problema con PlaySound
« Respuesta #1 en: Miércoles 24 de Noviembre de 2010, 16:31 »
0
PlaySound( (ExtractFilePath(Application->ExeName)+"\Sound\tap.mp3").c_str() ),NULL,SND_RESOURCE || SND_ASYNC)
:: Lo que puedes hacer sólo lo limita tu propia imaginación ::
Soft Evolutions Technology - http://www.softevolutions.es

ruben14

  • Nuevo Miembro
  • *
  • Mensajes: 4
    • Ver Perfil
Re: Problema con PlaySound
« Respuesta #2 en: Miércoles 24 de Noviembre de 2010, 20:07 »
0
Gracias por contestar...

Me sigue dando error ahora este:

Too Few parameter in call to '__stdcall PlaySound(const char*,void*,unsigned long)'

Gracias otra vez

softevolutions

  • Miembro activo
  • **
  • Mensajes: 84
  • Nacionalidad: es
    • Ver Perfil
    • http://www.softevolutions.es
Re: Problema con PlaySound
« Respuesta #3 en: Miércoles 24 de Noviembre de 2010, 20:12 »
0
Al responderte no me di cuenta de que te sobraba un paréntesis de cierre:

PlaySound( (ExtractFilePath(Application->ExeName)+"\Sound\tap.mp3").c_str() ),NULL,SND_RESOURCE || SND_ASYNC)

Sería así:

PlaySound( (ExtractFilePath(Application->ExeName)+"\Sound\tap.mp3").c_str(), NULL, SND_RESOURCE || SND_ASYNC)
:: Lo que puedes hacer sólo lo limita tu propia imaginación ::
Soft Evolutions Technology - http://www.softevolutions.es

ruben14

  • Nuevo Miembro
  • *
  • Mensajes: 4
    • Ver Perfil
Re: Problema con PlaySound
« Respuesta #4 en: Jueves 25 de Noviembre de 2010, 07:30 »
0
Perfecto...

Muchas Gracias