Author Topic: Sound  (Read 7865 times)

mythtek

  • Newbie
  • *
  • Posts: 2
Sound
« on: January 15, 2013, 09:00:15 AM »
1 ) Can someone please give some advice how to play a sound file (from the sound library) in a continuous loop.
      (Maybe some sample code?)

2) Is there any way to control the volume of sounds being played?

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 289
Re: Sound
« Reply #1 on: January 16, 2013, 01:54:57 PM »
1 ) Can someone please give some advice how to play a sound file (from the sound library) in a continuous loop.
      (Maybe some sample code?)

2) Is there any way to control the volume of sounds being played?

Hello

I'm sorry for the delay in replying but its taken me a while to check this out as its quite complex.

The SoundPlay command works fine:-

syntax --- SoundPlay(channel,filename)

Code: [Select]
SoundPlay(1,'mysound.mp3')
About the sound and video library - there are problems on some devices with the sound not starting.
Its strange - because if they are attached to a button then the sounds play fine.

Anyhow, I'll get this checked out.

About the HyperNext Studio movie and sound commands that you mentioned in your email - well they are not fully linked in to HAC - but are on the To-Do list - somehow they were missed in the conversion process.
 

Malkom




I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

mythtek

  • Newbie
  • *
  • Posts: 2
Re: Sound
« Reply #2 on: January 16, 2013, 04:17:30 PM »
I apologize to bother you again, but when will all the functions from the older Hypernext Studio be incorporated into Hypernext Android Creator?

If "SoundPlay(Channel, Fname)" worked for you, was the sound played from the sound library or where do you place the sound file and what operating system was it run.
IE: Can you specify the environment and parameters(Specifics) that worked please.

Thanks in advance.

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 289
Re: Sound
« Reply #3 on: January 16, 2013, 07:07:27 PM »
Hi

I'm sorry but I can't be specific when those commands will be working but I've been looking at the code today and need to get the Java looping etc worked out then  tested. Plus there are also a few other things to finish before the next update v1.17

For the SoundPlay command - I just made a folder called Local in the project's folder and placed the sound in there.

For instance if your project is called TestSound

TestSound
     Local
          music.mp3

the code is simply
Code: [Select]
@ -- play sound on channel 1 --
SoundPlay(1,'music.mp3')

The above code work both on a G1 Android phone and a Android tablet.

I hope this helps you get started.

Malkom

I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.