* * *

Author Topic: Cannot find wave resources in LazarusResources.Items  (Read 856 times)

CCP1CON

  • New member
  • *
  • Posts: 7
Cannot find wave resources in LazarusResources.Items
« on: June 19, 2012, 10:13:09 pm »
I have successfully compiled some wave files into the exe using {$R waves.rc}

waves.rc:
a_1 RCDATA "1.wav"
a_2 RCDATA "2.wav"   

They are definitely inside the exe, I can see it on the file size.

But I cannot find them inside the LazarusResources list.
Where they are went?

Leledumbo

  • Hero Member
  • *****
  • Posts: 4294
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Cannot find wave resources in LazarusResources.Items
« Reply #1 on: June 20, 2012, 01:17:16 am »
Lazarus resources and native resources are stored differently, see wiki on how to get native resources.

CCP1CON

  • New member
  • *
  • Posts: 7
Re: Cannot find wave resources in LazarusResources.Items
« Reply #2 on: June 20, 2012, 01:00:38 pm »
Thanks a lot LeleDumbo …

Got it and got it running.
I also figured out, if I use wave as resource type in the waves.rc script, like this:

Code: [Select]
a_1 WAVE "1.wav"
a_2 WAVE "2.wav"

I can play the sound directly without resource handling functions.

Code: [Select]
uses MMSytem, ...;
...
{$R waves.rc}
...
PlaySound('a_1', hInstance, SND_RESOURCE Or SND_NODEFAULT Or SND_ASYNC);

at least here on WinXP
« Last Edit: June 22, 2012, 07:40:08 am by CCP1CON »

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads