Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Saving a sound on Mobile

Discussion in 'Audio & Video' started by Pipaupe, Oct 13, 2015.

  1. Pipaupe

    Pipaupe

    Joined:
    Oct 13, 2015
    Posts:
    1
    Hi guys,
    I'm making a piano simulator and i want to make a "record" button.
    When I press it, the app start recording the sound played, and when press again, it stop the record.

    Thx if you can help !
     
  2. WoozyBytes

    WoozyBytes

    Joined:
    Mar 16, 2015
    Posts:
    8
    Hi :)
    If you want to save the recorded sound to Wav file there's a script for that you can use and is easy to implement.
    http://gist.github.com/darktable/2317063 .
    Make sure you change this Line --> int rescaleFactor = 32767;
    to -- > float rescaleFactor = 32767;
    Otherwise will sound weird.
    Also enable the last line that's commented out--> fileStream.Close();
    If you want to save to Mp3 i have no idea how to do that ,so if you find out please let me know lol
    Regards