Page 1 of 1

the sound doesn´t work

Posted: Mon Sep 12, 2011 11:41 am
by Ajoir
basically the code of my function is this:

Code: Select all

local function xxxxxxxxx()
local soundresource = soundLoad(getExecutionPath() .. "/alarm.wav");
soundSetVolume(soundresource, 1.0);
soundSetLooping(soundresource, true);
....
soundPlay(soundresource);
printf("state of a sound : " .. soundGetState(soundresource));
...
The function and all bots works fine, don't give me any mistake, but I can't ear any sound. The command "soundGetState" returns "unknow". What I am doing wrong? Could you help me?

Re: the sound doesn´t work

Posted: Mon Sep 12, 2011 12:00 pm
by Dsanchez
i haven't been able to get it to work either. i've got the wave in the correct folder but still get the error that it's missing. i thought it was because i uninstalled wmp from my computer. but reinstalling it didn't help.

Re: the sound doesn´t work

Posted: Mon Sep 12, 2011 2:04 pm
by Administrator
Do you guys by any chance have OpenAL installed? If it is, what version of it? What OS? Also post your log.txt.

Re: the sound doesn´t work

Posted: Tue Sep 13, 2011 6:21 am
by Ajoir
I didn't have OpenAL installing. I installed it and all seems works perfect. Thanks for your help, and your patience.

Re: the sound doesn´t work

Posted: Tue Sep 13, 2011 1:14 pm
by Dsanchez
my log.txt says the wave isn't there... even tho i can copy/paste it straight from the log into explorer and it will play the sound...

Re: the sound doesn´t work

Posted: Tue Sep 13, 2011 3:55 pm
by Administrator
Dsanchez wrote:my log.txt says the wave isn't there... even tho i can copy/paste it straight from the log into explorer and it will play the sound...
Post the log.

Re: the sound doesn´t work

Posted: Tue Sep 13, 2011 4:40 pm
by Dsanchez

Code: Select all

Tue Sep 13 14:47:06 2011 : Processor Type: 4X 586 @2400MHz, OS: Windows 7 Service Pack 1
Tue Sep 13 14:47:06 2011 : User privilege level: Administrator
Tue Sep 13 14:47:06 2011 : Lua glues exported
Tue Sep 13 14:47:06 2011 : MicroMacro v1.01 beta 4
Tue Sep 13 14:47:06 2011 : LuaCoco is available
Tue Sep 13 14:47:06 2011 : Keyboard layout: US English
Tue Sep 13 14:47:10 2011 : Executing script 'bot.lua'
-------------------------------------------------------------------------------


Tue Sep 13 14:47:10 2011 : Bot addon 'Rock5s_Mail_Functions' successfully loaded.
Tue Sep 13 14:47:10 2011 : Bot addon 'catchcavy' successfully loaded.
Tue Sep 13 14:47:10 2011 : Bot addon 'craftitem' successfully loaded.
Tue Sep 13 14:47:10 2011 : Loading of audio file 'Z:/Downloads/micromacro/scripts/rom/userfunctions/alarm.wav' has failed
Tue Sep 13 14:47:10 2011 : [WARN]: ...scripts/rom/userfunctions/userfunction_gmmonitor.lua:16
Failed to load sound file 'alarm.wav'
Tue Sep 13 14:47:10 2011 : Bot addon 'gmmonitor' successfully loaded.
Tue Sep 13 14:47:10 2011 : Bot addon 'GuildDonate' successfully loaded.
Tue Sep 13 14:47:10 2011 : Bot addon 'teleport' successfully loaded.
Tue Sep 13 14:47:10 2011 : Bot addon 'useGoodie_universal' successfully loaded.
Tue Sep 13 14:47:10 2011 : Language: english
Tue Sep 13 14:47:22 2011 : Using static char address 0x9C77FC, player address 0x45AFC800
Tue Sep 13 14:47:23 2011 : QUICK_TURN = true
Tue Sep 13 14:47:23 2011 : Keyboard settings are from settings.xml:
Tue Sep 13 14:47:23 2011 : MOVE_FORWARD                  W
Tue Sep 13 14:47:23 2011 : STRAFF_LEFT                   Q
Tue Sep 13 14:47:23 2011 : TARGET                        Tab
Tue Sep 13 14:47:23 2011 : ROTATE_LEFT                   A
Tue Sep 13 14:47:23 2011 : STRAFF_RIGHT                  E
Tue Sep 13 14:47:23 2011 : MOVE_BACKWARD                 S
Tue Sep 13 14:47:23 2011 : TARGET_FRIEND                 J
Tue Sep 13 14:47:23 2011 : MACRO                         0
Tue Sep 13 14:47:23 2011 : JUMP                          Space
Tue Sep 13 14:47:23 2011 : ROTATE_RIGHT                  D

Re: the sound doesn´t work

Posted: Tue Sep 13, 2011 6:35 pm
by lisa

Code: Select all

'Z:/Downloads/micromacro/scripts/rom/userfunctions/alarm.wav' 
Well according to the error you don't have the sound file in the right place, it needs to be in the rom/userfunctions folder.

Could it be because you are running it through a VM ?

Re: the sound doesn´t work

Posted: Tue Sep 13, 2011 7:55 pm
by Dsanchez
the sound file is in the correct location. i can copy and paste Z:/Downloads/micromacro/scripts/rom/userfunctions/alarm.wav from my log file into windows explorer and it will play the sound. no, not using vm.

Re: the sound doesn´t work

Posted: Tue Sep 13, 2011 8:09 pm
by lisa
Only thing I can think of is if the actual file name has capitals in it. explorer will autochange what you are looking for into the upper or lowercase to match the actual file. MM will only work if it matches exactly.

Re: the sound doesn´t work

Posted: Wed Sep 14, 2011 10:30 am
by Administrator
Try installing OpenAL. Maybe there's some dependency (which isn't being reported for one reason or other). Let me know if that works.

Re: the sound doesn´t work

Posted: Wed Sep 14, 2011 4:16 pm
by Dsanchez
Administrator wrote:Try installing OpenAL. Maybe there's some dependency (which isn't being reported for one reason or other). Let me know if that works.
it's working now, thanks!