Audio Input

0 favourites
  • 6 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • I know it's been brought up before, but when I updated C2 recently and saw the camera access in the objects, I was wondering if these means there is a chance that microphone access might be feasible? I am not super clear on the tech. specs, but it sounds like the <device> tag might hold promise?

  • The User Media plugin (which does webcam input) will eventually support audio input too. However, it's still being specified by the W3C, and no browsers support a way to get audio input yet, so it will have to come later.

    Out of curiosity, what are you hoping to use it for? Just want to make sure it gets implemented in a way which lets everyone do what they want.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I wrote a game design doc for a competition that was trying to find new ways to use voice control in games; my idea was that the player controls the character by using pitch + pan detection. A middle pitch, high pitch, and low pitch, combine with Left-Center-Right audio locations, to make a 9 way control, like a joystick, which controls a tunnel-racing character. There were some other thoughts, If you were interested, here's a PDF!

    I was going to try to build it in Flash, but honestly, it's a bit over my head right now, I was just curious if it would be feasible in construct since I am much more familiar w/ (and like much more) what you've done with C2.

  • the_chosen_byte Yes the getusermedia webkit has been think to allow cam recording and microphone recording too. So it just a question of time before this features will be really available.

  • All : in fact, getUserMedia isn't usable to do that particular use case.

    While you can access the microphone with gUM(), it's not designed to inject the audio flux inside an <audio> object. It's designed to stream it over a connection (like audio caht over WebRTC).

    What you need is the Streams W3C API, which no browser support yet.

    For a client I'm currently developing a plugin that uses Flash as a fallback to do that. You use a non-visible flash code block to access the mic. The actionscript then encode the RAW data from the mic in a MP3 and a OGG file (to cover all browsers). Those two files are then base64 converted and sent to Javascript via ExternalInterface.

    So, in the end, my C2 webapp can use mp3 or ogg files from the microphone !

    That project will be done at the end of the week, I'm going to release the plugin here after that.

    Some time in the future, I'll add some JS code to do some basic audio processing on that data...

  • Pode, that sounds like a pretty solid work-around, nice one. I look forward to checking that project out!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)