See site in english Voir le site en francais
Website skin:
home  download  forum  link  contact

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Author Topic: Sound issue  (Read 2062 times)

0 Members and 1 Guest are viewing this topic.

Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
20 September 2011, 04:32:30
I am trying to get a wav to play here.  No issues from the log.

I can hear other sounds but not where I have put it.  The input box displays but doesn't play the wav.


Code: [Select]
RequestLoadVesselWave3(CNGA3SoundID,DESIGNATION,"Sound\\1999\\DESIGNATION.wav",BOTHVIEW_FADED_FAR);
RequestLoadVesselWave3(CNGA3SoundID,DESIGNATIONACCEPTED,"Sound\\1999\\DESIGNATIONACCEPTED.wav",BOTHVIEW_FADED_FAR);
RequestLoadVesselWave3(CNGA3SoundID,ENG,"Sound\\Vessel\\LASERTANK\\Tank-go.wav",BOTHVIEW_FADED_FAR);

I hear the code when the action area is entered and enter is pressed.
Code: [Select]
Crew.DeclareActionArea(5,_V(  39.91428,0,67.31249),2,TRUE, "DESIGNATION.wav","Send Car");//TCARCOMPUTER STATION


Code: [Select]
if(ActionAreaReturnCode==5)// at COMPUTER
{
OBJHANDLE hV=oapiGetFocusObject();
VESSEL *v=oapiGetFocusInterface();
UMMU1=v->GetAttachmentHandle(true,1);
if(GetAttachmentStatus(UMMU1))
{

if(!_strnicmp(dest,"1",1))
{
PlayVesselWave3(CNGA3SoundID,DESIGNATIONACCEPTED);
RevertTCAR1();
strcpy(dest,"");
}
}
else
{
// PlayVesselWave3(CNGA3SoundID,doorsound2);

if(!_strnicmp(dest,"",1))
{
PlayVesselWave3(CNGA3SoundID,ENG);
oapiOpenInputBox("Your destination (1, or 2)?  1-NGA3 2-Nowhere",ChoiceBox,0,2,(void*)this);

}
else
{
if(!_strnicmp(dest,"1",1))// |
{
AttachUmmu1();//NGA3
}

if(!_strnicmp(dest,"2",1))
{
//do nothing then we have to reset dest.
strcpy(dest,"");
}
}
}

}

Quote
OrbiterSound 3.5 ver. May 13 2007  Log Started
***********************************************

Vessel MBA requested an ID, returned= 0 OK
Vessel UMmu_99T-Keith_Roper1 requested an ID, returned= 1 OK

MFD Requested an ID: UMmuRadio Assigned ID=0 OK
Vessel UMmu_99M-Paul_Roper requested an ID, returned= 2 OK

Vessel UMmu_99R-Paul_Collins requested an ID, returned= 3 OK

Vessel UMmu_99-Frank_Craig requested an ID, returned= 4 OK

Vessel UMmu_99T-Keith_Roper requested an ID, returned= 5 OK

Vessel UMmu_99M-Paul_Roper1 requested an ID, returned= 6 OK

Vessel DINING requested an ID, returned= 7 OK
Vessel HYDROPLP1 requested an ID, returned= 8 OK
Vessel COMP requested an ID, returned= 9 OK
attempting focus change...
Focus not ready bypassing focus change - Ok
Attempting RenderViewport initialisation...
Attempting GetStartValue initialisation...
Passed GetStartValue - Ok
Initialising directsound...
directsound initialised - OK
Passed RenderViewport - Ok
Attempting Mp3 initialisation...
MP3 found in playlist =  1
Mp3 initialised - Ok
Focus changed attempting to load vessel wave
Focus changed load vessel wave - OK
attempting focus change...
Attempting GetStartValue initialisation...
Passed GetStartValue - Ok
Focus changed attempting to load vessel wave
Focus changed load vessel wave - OK
focus changed - Ok
attempting focus change...
Attempting GetStartValue initialisation...
Passed GetStartValue - Ok
Focus changed attempting to load vessel wave
Focus changed load vessel wave - OK
focus changed - Ok
attempting focus change...
Attempting GetStartValue initialisation...
Passed GetStartValue - Ok
Focus changed attempting to load vessel wave
Focus changed load vessel wave - OK
focus changed - Ok
Attempting to close viewport...
Attempting to kill DirectSound...
DirectSound killed - OK
Passed CloseRenderViewport - Ok
Exited to Orbiter Launchpad - OK

Passed ExitModule - Ok


Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
Reply #1 - 20 September 2011, 14:56:48
Code: [Select]
RequestLoadVesselWave3(CNGA3SoundID,doorsound2,"Sound\\1999\\keydoor.wav",BOTHVIEW_FADED_FAR);


ok for some reason any sound in this code doesn't play.






Code: [Select]
if(ActionAreaReturnCode==6 )//at nga3
{
// do something cool here, doors animation, system activation or repairing etc. Etc.
[b]PlayVesselWave3(CNGA3SoundID,doorsound2);[/b]
if (TCAR1_status==DOOR_DOWN && TCARSTA3_status==DOOR_UP)//TCAR1 UP PRESENT TCAR 2 UP PRESENT DOOR CLOSED
{
RevertTCARSTA3();
oldsimt=simt;
}
else if (TCAR1_status==DOOR_DOWN && TCARSTA3_status==DOOR_DOWN)//TCAR1 UP PRESENT TCAR 2 UP PRESENT DOOR OPEN

{
RevertTCARSTA3();
oldsimt=0;
}
else if(TCAR1_status==DOOR_UP && TCARSTA3_status==DOOR_DOWN )//TCAR1 NOT AT COMPUTER SO MOVE
{
RevertTCAR1();

}

}





but the wav here do play.
Code: [Select]
Crew.DeclareActionArea(0,_V(   1.21512,0,55.69981),6,TRUE,"door1c.wav","Open/Close Doors ");
Crew.DeclareActionArea(1,_V(   10.82566,0,82.56007),6,TRUE, "door1c.wav","Open/Close Doors");


Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
Reply #2 - 11 October 2011, 12:34:21
The sound doesn't play due to the focus being on the ummu.  Why does the wav play in the set action area though?

« Last Edit: 11 October 2011, 12:34:21 by gattico »