Home / Topic / Audio files won't work in the build

Audio files won't work in the build

Home Kwiksher Forums Kwik 3 Bugs Audio files won't work in the build

Viewing 5 posts - 1 through 5 (of 5 total)
  • mayuzane
    Participant
    #84213

    Hello, my problem is almost exactly the same as the one mentioned in this old post: http://kwiksher.com/forums/topic/cant-build-any-of-the-sample-projects/

    However, the solution given in that topic doesn’t seem to work for me.

    Any audio I add to my project simply cannot be played during testing, and I have already placed the audio files in the build folder’s audio folder, as seen below (the audio files are in different formats because I wanted to check if both wav and mp3 were compatible)

    file location

    Corona’s log reads:

    File: page_2.lua
    Line: 82
    Warning: audio.getDuration: invalid sound object 0x0 (previously disposed?)

    stack traceback:
    [C]: in function ‘getDuration’
    page_2.lua:82: in function <page_2.lua:48>
    ?: in function ‘dispatchEvent’
    ?: in function ‘gotoScene’
    page_1.lua:308: in function ‘_listener’
    ?: in function <?:141>
    ?: in function <?:221>

    main.lua can be read here: https://www.dropbox.com/s/wwpamxdqhhj7khs/main.lua?dl=0
    page_1.lua: https://www.dropbox.com/s/i7j245slw0oe8hb/page_1.lua?dl=0
    page_2.lua: https://www.dropbox.com/s/wxdwfjnzjchis56/page_2.lua?dl=0
    The .kwk file is here: https://www.dropbox.com/s/g6mgxf394e8bru3/ikanharu3audio.kwk?dl=0

    Yamamoto
    Keymaster
    #84220

    composer.lang = “en” or “ml” is set in the code.

    allAudios.page01malay =  audio.loadStream( composer.audioDir..composer.lang.."page01malay.wav") 
    

    for instance, please rename put the english audio file into audio/en/”page01malay.wav”.

    • This reply was modified 3 years, 9 months ago by  Yamamoto.
    • This reply was modified 3 years, 9 months ago by  Yamamoto.
    • This reply was modified 3 years, 9 months ago by  Yamamoto.
    mayuzane
    Participant
    #84222

    Nope, still didn’t work. I created a new kwik project using the same assets to try and isolate the problem.

    Still getting a runtime error message in Corona:

    File: page_2.lua
    Line: 78
    Warning: audio.getDuration: invalid sound object 0x0 (previously disposed?)
    
    

    stack traceback:
    [C]: in function ‘getDuration’
    page_2.lua:78: in function <page_2.lua:44>
    ?: in function ‘dispatchEvent’
    ?: in function ‘gotoScene’
    page_1.lua:238: in function ‘_listener’
    ?: in function <?:141>
    ?: in function <?:221>’

    In page2.lua, lines 76 to 79:

    -- Audio list 
         allAudios.page01malay =  audio.loadStream( composer.audioDir..composer.lang.."ge01malay.mp3") 
         local a = audio.getDuration( allAudios.page01malay ); 
         if (a > tonumber(allAudios.kAutoPlay)*1000 ) then allAudios.kAutoPlay = math.ceil((a + 1000)/1000); end;

    Here’s a zip of the entire project folder:
    https://www.dropbox.com/s/6p0r1nx9pate8og/ikanharuaudio4.zip?dl=0

    I’m sorry for all the trouble, this is really perplexing. Thank you so much for helping.

    Yamamoto
    Keymaster
    #84223

    I see that your audio is set with language. the file name must be prefixed with ml_ or en_
    Please rename your audio to ml_page01malay.mp3 and set it on page 2 by Kwik

    http://kwiksher.com/tutorials_kwik/creating-a-multilingual-project-with-kwik-3-expert/

    mayuzane
    Participant
    #84226

    Problem solved! Had to copy-paste the mp3s to the build’s audio folder, and now everything works fine!

    Thank you very much!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Privacy Preference Center

Strictly Necessary

these coolies are for WP-SpamShield, gdpr-wp, woocommerce, paypal

PHPSESSID, SJECT16, JCS_INENREF, JCS_INENTIM, gdpr, woocommerce_cart_hash, woocommerce_items_in_cart, woocommerce_recently_viewed, wordpress_, wordpress_logged_in_, wordpress_sec_, wordpress_test_cookie, wp_woocommerce_session_, AKDC, akavpau_ppsd

Functionality

WordPress cookie created when auto-saving a post in the editor.

wp-saving-post, wp-settings-, wp-settings-time-

Performance

google analytic

__utma,__utmb,__utmc,__utmz,_ga,_gid,_gat

Advertising