Welcome, Guest
Username: Password: Remember me
Components and Libraries for Graphics 3D Development, discussions, problems and suggestions
  • Page:
  • 1

TOPIC:

GLSound 11 years 4 months ago #2664

  • 4aiman
  • 4aiman's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
  • Posts: 227
  • Thank you received: 12
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.
コンソールマニアック

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

Last edit: by 4aiman.

GLSound 11 years 4 months ago #2668

  • 4aiman
  • 4aiman's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
  • Posts: 227
  • Thank you received: 12
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.

GLSound 11 years 4 months ago #2675

  • 4aiman
  • 4aiman's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
  • Posts: 227
  • Thank you received: 12
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.

  • Page:
  • 1