[Idea] Audio Player Mod

Discussion in 'Mod Discussions' started by lokiCML, November 26, 2013.

  1. lokiCML

    lokiCML Post Master General

    Messages:
    1,973
    Likes Received:
    953
    Think about doing this probably after release.

    High-level outline for a audio player mod.
    • allow for contextual audio events
    • supports these formats; Vorbis, FLAC, AAC, and MP3 (AAC issues)
    • hotkeys, console commands, graphically, or a combination of them to control it
    • the ability to use music files in a directory outside of PA mods directory (sandbox/VFS issue)
    There are some problems with this the lack of AAC support from FMOD. Also not really sure if we'll be able to use FMOD directly or indirectly. An idea to get around the lack of support for AAC using PortAudio with a JavaScript binding possibly node-core-audio. Then use FFmpeg or FAAD2 to playback on Windows, MacOS X, and Linux. Instead of using that I could use aurora.js/aac.js. The ability to play AAC won't be there until the user adds the library to the proper folder.

    Sandbox I assume blocks any mod from accessing the file system. VFS could be allowed to access the file system for the mod. A permission-based system to notify the user about any issue that could arise from this. See if a shortcut to the music directory could bypass sandbox.

    thoughts

    P.S. Thought about making a poll and decided to make it a hidden one.;)
    Last edited: November 26, 2013
  2. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    You don't need access to FMOD to implement audio player. Coherent will work for that just fine.

    Also HTML5 FileSystem API is already there, but Coherent/Uber need to implement some interface which will ask user to allow/disallow such access.
  3. lokiCML

    lokiCML Post Master General

    Messages:
    1,973
    Likes Received:
    953
    How can I control the volume without access to the audio subsystem. What codecs are implemented in coherent? I did some googling but couldn't find out. I would like this to be a seamless experience.
    Well I would like the ability to read the users music directory. That may not be possible due to the sandbox. Now if it isn't I won't be developing this mod because I don't want the user to have to do any kind of hacks. The allow/disallow were discussed in these two interesting threads.

    https://forums.uberent.com/threads/modding-requests-from-supcom-modders.34170/
    https://forums.uberent.com/threads/modding-compared-with-sup-com.34101/
  4. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    You can control volume using same HTML5 Audio APIs just like built-in youtube video in main menu work. E.g they don't use FMOD for audio output.

    Coherent it's just Chromium/Chrome browser. It's mean it's support exactly same formats as Google Chrome: WAV, MP3, OGG.

    Though it's depends on how Coherent built so this have to be tested. E.g they might disable MP3 support because it's disabled in Chromium by default.

    It's main problem at moment. With HTML5 FileSystem APIs you can ask user to specify directory with audio and then your player will have access to it. Coherent support (info) user requests, but as long as I know Uber didn't implemented it within PA yet. So basically you can't ask player for microphone/webcam/filesystem/etc access.

    This is different story. Coherent it's just browser so you obviously can't read part of filesystem you want, but just like Google Chrome it's support HTML5 features that allow to implement this.

Share This Page