User Tag List

Results 1 to 8 of 8

Thread: Play Sample File on a specific Channel, doesn't seem to work?

  1. #1
    No Products Registered

    Join Date
    Oct 2015
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Play Sample File on a specific Channel, doesn't seem to work?

    Hi there, I have a sound file that lives on my phones internal storage:
    "/appname/audio/sound2.wav"

    I want to play this sound so I choose "Play Sample File on a specific Channel
    I then choose "Expression" and type this:
    "/appname/audio/sound2.wav"

    But in the app this doesn't seem to play back?

    Am I entering it wrong, should I do APPPATH/appname or something?

    Thanks in advance.

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    650
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Where is the file located on your phone exactly(full path on your phone)?
    When you create a folder on internal storage with a normal Android file explorer for example and name it audio and put your sound file in here, the expression would be:
    ExternalStorageDirectory$( "Android object" ) + "/audio/sound2.wav"

  3. #3
    No Products Registered

    Join Date
    Oct 2015
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Wodjanoi, thanks for helping again!
    You set me in the right direction here's what I found so that it helps others like me with the same question.

    You need 2 extensions in your level: “Android object” and also the “File” object

    At the start of the frame Use the File object> Directory Actions>Create Directory then put this in as the expression:
    ExternalStorageDirectory$( "Android object" ) + "/appname/data"

    This will make these folders named this way.

    Then you can save data into this folder, but you have to have made it first.

    If you have sound2.wav in this folder to play it you do:

    Play Sample File on a specific Channel
    then choose "Expression" and type this:

    ExternalStorageDirectory$( "Android object" ) + "/app name/data/sound2.wav"

    Easy when you know how!

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    650
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Alright, so you wanted a solution for playing a sound from the app location in data folder.
    I wasn't sure if that was the location of your audio folder on your phone storage, after reading your first post, but in this case you have to use the File object, that's right.

  5. #5
    No Products Registered

    Join Date
    Oct 2015
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry for being vague, thanks for the help!

    I had a further question but I thought it would be better to start a new topic rather than adding to this, so feel free to answer that one if you can help

  6. #6
    Forum Moderator

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Perry's Avatar
    Join Date
    Dec 2013
    Location
    Watertown, WI
    Posts
    4,309
    Mentioned
    44 Post(s)
    Tagged
    0 Thread(s)
    for Android you don't need the file object

    you add the file to the binaries and then you just call it with play Sample "mysong.wav" etc

    edit: I see you have the files externally

  7. #7
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    AlanRuno's Avatar
    Join Date
    May 2013
    Posts
    334
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Cant Play Sound File

    Quote Originally Posted by Perry View Post
    for Android you don't need the file object

    you add the file to the binaries and then you just call it with play Sample "mysong.wav" etc

    edit: I see you have the files externally
    I get this log when trying to simply play an already added to binary sound file.

    FileSource: Failed to open file '/1.ogg'. (No such file or directory)
    03-14 17:24:55.714 594 32224 E GenericSource: Failed to create data source!

    Anyone know why?

  8. #8
    Forum Moderator

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleMac Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Perry's Avatar
    Join Date
    Dec 2013
    Location
    Watertown, WI
    Posts
    4,309
    Mentioned
    44 Post(s)
    Tagged
    0 Thread(s)
    how did you add it?

    If you select the file from a folder first, and save the MFA, the link gets added to the binaries.

Similar Threads

  1. "Play sample File on a Specific Channel" bugs.
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 2nd December 2008, 02:32 PM
  2. Playing sample from file doesn't work
    By chrilley in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 17th August 2008, 11:12 PM
  3. Play sample file on a Specific Channel
    By Olivier in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 6th February 2008, 05:02 PM
  4. [Question] Play sample file on a specific channel
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 9th October 2007, 03:28 PM
  5. Play sample file on a Specific Channel problem
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 9th April 2007, 07:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •