× Components and Libraries for Graphics 3D Development, discussions, problems and suggestions

Question GLSound

  • 4aiman
  • 4aiman's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
More
8 years 4 months ago - 8 years 4 months ago #2664 by 4aiman
GLSound was created by 4aiman
I'm not sure where to post, since GLscene is audio AND graphics package...
In some previous CT (<2.7) I used this code .
But now it doesn't work. CT 2.7, 2.8 and 2.9 refuse to play ANY sound until I create at least one TGLSoundManager.
I did, error is gone but the sound didn't appear.

Question: How one should play mp3 or ogg music in GLScene if the code below produces silence?


Part of the message is hidden for the guests. Please log in or register to see it.

コンソールマニアック
Last edit: 8 years 4 months ago by 4aiman.

Please Log in or Create an account to join the conversation.

  • 4aiman
  • 4aiman's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
More
8 years 4 months ago #2668 by 4aiman
Replied by 4aiman on topic GLSound
Ok, after some digging I managed to produce sound from *.wav version of the file.
GLSoundManager:=TGLSoundManager.Create(self);
  GLSoundManager.Listener:=GLCamera1;
  GLSoundManager.MasterVolume:=1;
  GLSoundManager.Sources.Add;
  GLSoundLibrary1.Samples.Clear;
  GLSoundLibrary1.Samples.AddFile('C:\555-2_45\res\bgm\battle_2.wav','battle_2');
  GLSoundManager.Sources[0].SoundLibrary:=GLSoundLibrary1;
  GLSoundManager.Sources[0].SoundName:='battle_2';
  GLSoundManager.Sources[0].Sample.PlayOnWaveOut;
  GLSoundManager.Active:=true;

But how can I play mp3 or ogg?
What do I need to set infinite number of loops when playing a sound? Nbloops property didn't helped at all - *.wav file sounded only once and then I heard silence once again.

コンソールマニアック

Please Log in or Create an account to join the conversation.

  • 4aiman
  • 4aiman's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
More
8 years 4 months ago #2675 by 4aiman
Replied by 4aiman on topic GLSound
Everyone feel good with *.waves?...
Anyway I must report that PlayOnWaveOut doesn't work for linux (ubuntu 12.04+mate, NOT mint).
So... "UP" and "What should I do?"

コンソールマニアック

Please Log in or Create an account to join the conversation.