The Sound of Silence - Android Edition

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Lagi Pittas
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 365
Joined: Mon Jun 10, 2013 1:32 pm

The Sound of Silence - Android Edition

Post by Lagi Pittas » Mon Jun 22, 2015 10:38 am

Hi Guys

I posted in a thread about sound problems on the Beginners Forum -

http://forums.livecode.com/viewtopic.php?f=7&t=20123

I tried all manner of option in the engine directory with pm3 and wave - nothing works

I asked for a stack - that plays a sound ANY sound to be uploaded so I can at least have a basis to work from - so far no takers.

Im asking here, nay - pleading for a 4 line mouseup piece of code with exactly what settings to use - I think I've used theme all.

Something that has worked for you not what it says in the manual. This all works ok on desktop. Nearly 4 days now and I cant get anything other than a BEEP

Regards Lagi

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Location: Plymouth, UK
Contact:

Re: The Sound of Silence - Android Edition

Post by dave.kilroy » Mon Jun 22, 2015 11:28 am

Hi Lagi - here's a slightly different approach for you - check out mobilePlaySoundOnChannel in the dictionary - the following code works fine on iOS and Android:

Code: Select all

on playSyncAudio pStatus
   if (mobileSoundOnChannel("sync") is empty) or (mobileSoundOnChannel("sync") is "could not find channel") then
      put get.AudioFolder() into tAudioPath
      --
      if pStatus = "up" then put "PowerUp1.mp3" into tAudioFile
      else put "PowerDown1.mp3" into tAudioFile
      --
      put tAudiofile after tAudioPath
      if there is not a file tAudioPath then answer "no audio file"
      put "sync" into tChannelName
      put "now" into tType
      mobilePlaySoundOnChannel tAudioPath, tChannelName, tType
   end if
end playSyncAudio
"...this is not the code you are looking for..."

Lagi Pittas
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 365
Joined: Mon Jun 10, 2013 1:32 pm

Re: The Sound of Silence - Android Edition

Post by Lagi Pittas » Mon Jun 22, 2015 3:33 pm

Hi Dave,

Thanks for the response but I had already used the playmobile with no success.

But I typed your code in anyway using both the documents and engine folder for botha wav and an mp3 file and still no joy.

The files HAVE to be there because I get no error from your code but I do if I change a single letter of the name in the path.

I am using a max with Yosemite although Im going to test on windows at some stage.

What version of LC does yours werk on - I am on 6.7.5 but have also tried 7.4 with all permutations

It has to be some sort of environment problem as all the other options like play don't work either.

This is no getting silly - there are a LOT of posts with the same problem but some worked in the end - again after trying many different ways

Can you clear up what the copy referenced files does?

Does it copy the files into a folder under the engine called _referencedfiles

I still think play "file" should have worked as that specifically says IOS/Android


I have the latest JDK - do I need to put an older one in?

Thanks again

Regards Lagi

Post Reply

Return to “Android Deployment”