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: How do I get Orbitersound to work reliably?  (Read 11702 times)

0 Members and 1 Guest are viewing this topic.

Offline Face

  • Jr. Member
  • **
  • Posts: 40
  • Country: Austria at
  • Karma: 9
Reply #25 - 29 September 2006, 23:41:08
Quote
DanSteph wrote:
Quote
Face a écrit:
I just wanted to inform you, that the OrbiterSound.dll you posted isn't working at all on my machines. I thought the
fix for
Doug's problem would fix the loading of vessel sounds from late-started MFDs as well. That would render the need
for special

Sorry I'm not sure I get it...

Do you mean you don't have any sound playing or only that MFD sound don't work ?

Doug: I'll see to add a version check...

Dan

Sorry for my sometimes cumbersome English ;) .
What I wanted to say is, that the DLL you posted is not working for me at all.
* It doesn't play any sound on my Win98 or XP installation (with OrbiterSound3 installed previously).
* It doesn't show the Radio/MP3 MFD mode (it doesn't show up in the Shift-F1 dialog).

With a plain O2K6 installation and OrbiterSound3 -> everythings OK / sound is playing.
With the OrbiterSound.dll - extracted from the archive from the link of your posting in this thread - copied to the
/Modules/Plugin/ and overwriting the OS3-DLL -> no Radio/MP3-MFD / no sound is playing. Just like it never was activated (but
of course I activated it in the modules tab without errors!).

I don't have a clue what's going on. Did you compile the OrbiterSound.dll for the (now already released) O2K6 Patch 1? Did
you compile it with Visual Studio 7 or 8? There were some issues with DLLs compiled with this versions. I just have VS 6
installed on my test machines....

I hope it is just some stupid fault of myself :wall:

cheers,
Face



Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #26 - 30 September 2006, 00:21:15
I compiled it with the patch... hope this is the problem ?
Else I have VS8... but if it work on Doug's computer I think it's not the problem ??

what say the Orbiter.log ? I have this:

Module OrbiterSound.dll [API v.060425]

I just checked it doesn't work on my previous installation of Orbiter (2006 + beta patch of july)
it even trow an error "entry point not found" or something like that...

Seem you need the Orbiter patch ?

if it still don't work... it might be VS8 problem related, in this case can you
do something for me ? DOn'T install any Ms stuff because I'll need someone
100% sure that it don't have the new file so I can test what to provide
with OS so it work on any computer....

Best

Dan



Message modifié ( 30-09-2006 01:26 )


Offline Face

  • Jr. Member
  • **
  • Posts: 40
  • Country: Austria at
  • Karma: 9
Reply #27 - 30 September 2006, 10:43:19
Quote
DanSteph wrote:
I compiled it with the patch... hope this is the problem ?
Else I have VS8... but if it work on Doug's computer I think it's not the problem ??

what say the Orbiter.log ? I have this:

Module OrbiterSound.dll [API v.060425]

I tried it with 060925 (the last beta - RC3 IIRC). It doesn't even show that line in the Orbiter.log, that's why I thought
about the VS7/8 thingy.

Quote
DanSteph wrote:
I just checked it doesn't work on my previous installation of Orbiter (2006 + beta patch of july)
it even trow an error "entry point not found" or something like that...

Seem you need the Orbiter patch ?

The strange thing is: I don't get any errors at all on activating the module. Neither with O2K6 nor with RC3. Neither on
Win98 nor on XP.
Isn't the official patch release the same as RC3?

Quote
DanSteph wrote:
if it still don't work... it might be VS8 problem related, in this case can you
do something for me ? DOn'T install any Ms stuff because I'll need someone
100% sure that it don't have the new file so I can test what to provide
with OS so it work on any computer....

I will try it with the official patch and give feedback. I don't think it will help, though.
Of course, I won't install anything MS related on this bloody old Win98 machine. It is my best test machine ;)
So you're welcome to use it (and me) as test ground for OS3.5 . Just let me know what information you need additionally...

cheers,
Face



Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #28 - 30 September 2006, 13:07:29
Okay lets start....

I have read somewhere that you only need mscvrt80.dll trowed in "modules" folder.
If this is only the required we are saved... If not I'm affraid I'll have to ask people
to install a whole bunch of Ms library and I hate that. I worked during years
on VS97 (did you said outdated ;) ? ) I just upgraded to VS8 so it would be a bad news for me.

But first lets try any solution to avoid uggly installation scheme, can you try this
dll and tell me if it work ? in PE explorer I don't see the msvcrt80.dll anymore
it's statically linked.

http://www.dansteph.com/publie/forum/news/OrbiterSound_mt_msvcrt.zip

If it work *cross finger* can you try also the previous DLL of this thread with the latest
patch of Martin, this just to confirm that it was really the problem.

Best

Dan



Post Edited ( 09-30-06 13:18 )


Offline Face

  • Jr. Member
  • **
  • Posts: 40
  • Country: Austria at
  • Karma: 9
Reply #29 - 30 September 2006, 14:51:31
Great! This DLL works for me! :wor:

I tested it with the official release of the patch.
I tested the previous DLL with the official release, too. It doesn't work (as suspected).

Whatever you did, it solved the problem.

Unfortunately, loading vessel sounds from MFD code (without the scenario-workaround) still doesn't work.
The following is an example for MFD-triggered vessel-sound loading:
Quote
// Constructor - Creates the MFD mode and links it with the appropriate drive and MFD
// instances if available. If the drive or MFD instance is not available, it will be
// created.
JumpDriveMFD::JumpDriveMFD (DWORD w, DWORD h, VESSEL *vessel, UINT mfd)
: MFD (w, h, vessel)
{
   int soundSlot[4]={LOAD,WOOSHOUT,BANG,WOOSHIN};
   char key[30];
   DWORD i;

   this->vessel=vessel;
   width=(int)w/35;
   heigth=(int)h/28;
      
   sprintf(key, "%p", vessel);
   Drive=(JumpDrive *)g_JumpDrives->get(key);
   if (Drive==0)
   {
      sound=ConnectToOrbiterSoundDLL3(vessel->GetHandle());
      RequestLoadVesselWave3(sound,   LOAD,      LOADWAV,      DEFAULT);
      RequestLoadVesselWave3(sound,   ENGAGE,      ENGAGEWAV,      DEFAULT);
      RequestLoadVesselWave3(sound,   WOOSHOUT,   WOOSHOUTWAV,   DEFAULT);
      RequestLoadVesselWave3(sound,   BANG,      BANGWAV,      DEFAULT);
      RequestLoadVesselWave3(sound,   WOOSHIN,   WOOSHINWAV,      DEFAULT);
      RequestLoadVesselWave3(sound,   CHARGE,      CANCELWAV,      DEFAULT);
      JumpDriveData data;
      data.vessel=vessel;
      data.sound=sound;
      data.soundSlot=soundSlot;
      data.env=&g_Environment;
      data.jump=new double[CELLS];
      data.jump[0]=JUMPPOS;
      for(i=1;(int)i<CELLS;i++) data.jump=data.jump[i-1]*JUMPSCALE;
      data.speed=JUMPVEL;
      data.offset=FLASHOFFSET;
      data.loadtime=RELOADTIME;
      data.capacity=CAPACITY;
      data.cells=CELLS;
      Drive=new JumpDrive(data);
      g_JumpDrives->put(key, Drive);      
   }
   else
   {
      sound=Drive->GetSoundHandle();      
   }

   sprintf(key, "%p:%d", vessel, mfd);
   Data=(JumpDriveMFDData *)g_JumpDriveMFDs->get(key);
   if (Data==0)
   {
      Data=new JumpDriveMFDData;
      g_JumpDriveMFDs->put(key, Data);
      DWORD j=oapiGetObjectCount();
      OBJHANDLE obj=vessel->GetHandle();
      for(i=0; i<j; i++) if (oapiGetObjectByIndex(i)==obj) break;
      Data->target=i;
      Data->distance=0;
      Data->mode=0;
      Data->j2cells=1;
   }      
}

This code only works if the MFD is already activated in the scenario. My first guess was, that this is somehow related to the
loading problem of Doug. Looks like it isn't so :(

cheers,
Fritz



Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #30 - 30 September 2006, 15:17:31
Greeeat ! :eek:

MFD function aren't done yet, I'll inform you when done (by mail)
I expect within one week but I don't know really, it may be earlier.

How much sound do you need really and what do you intend to do ?

Best

Dan


Offline Face

  • Jr. Member
  • **
  • Posts: 40
  • Country: Austria at
  • Karma: 9
Reply #31 - 30 September 2006, 22:38:52
Thanks for the work, Dan. Take the time you need, there is no need to hurry ;) .

The soon-to-be-released JumpDriveMFD (the above code is from this project) provides an MFD mode that introduces 4
vessel-sounds and 2 MFD-sounds (with all 7 implemented as vessel-sounds, of course).

The 2 MFD-sounds are:
* Confirmed click
* Rejection sound (some kind of error beep)

The 4 vessel-sounds are:
* Acceleration sound
* Explosion effect sound
* Deceleration sound
* Charging-up sound (some kind of loading/pumping ambience)

The vessel-sounds are loaded by the MFD constructor, as you can see in the previously posted code.

I think 10 sound-slots for each MFD mode is enough. If it is reloadable as it would be with the vessel-sounds now, it is
flexible, anyway.

cheers,
Fritz



Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #32 - 30 September 2006, 22:58:07
Depend where the MFD are initialised it might be simple or not, I'll see.

For now I'm working simutaneous on OrbiterSound 3.5 DGIII-06 and U-Mmu (Universal Mmu SDK)
I hope to get all working within 3 weeks max.

See here: http://www.orbitersim.com/Forum/default.aspx?g=posts&t=10232

Best

Dan



Message modifié ( 30-09-2006 23:04 )


Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #33 - 06 October 2006, 17:35:50
Hello Again,

I solved the "delayed" load now this one should load the sound imediattely
IF your vessel have focus.

You can do:

requestload()
play()

without waiting one loop.

Try this one and let me know

http://www.dansteph.com/publie/forum/news/OrbiterSound_mt_immed.zip

Best

Dan



Message modifié ( 06-10-2006 17:38 )


Offline Doug Beachy

  • Jr. Member
  • **
  • Posts: 75
  • Karma: 0
Reply #34 - 07 October 2006, 20:14:22
The new DLL works like a charm!  :beer:  This makes the code a lot more elegant because now I don't have to
wait one timestep before playing a newly-loaded wav file now.  Great job!


Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #35 - 07 October 2006, 20:56:46
You welcome :)

Let me know if you experience any trouble...

Official Release within 2-3 weeks...

Dan


Offline Doug Beachy

  • Jr. Member
  • **
  • Posts: 75
  • Karma: 0
Reply #36 - 18 November 2006, 02:35:25
Just a quick question: any estimate on when OrbiterSound 3.5 will be officially released?  Will it be this
Tuesday or next? :turning:

 I would like to add an OrbiterSound version check to my new ship.  :)


« Last Edit: 18 November 2006, 02:35:25 by Doug Beachy »