Jump to content


Tech Blog 87 - Recording And Streaming Audio

  • Please log in to reply
2 replies to this topic

#1 Nocturne


    Nocturne Games

  • Administrators
  • 25708 posts
  • Version:GM:Studio

Posted 21 November 2014 - 01:47 PM

Recording And Streaming Audio - https://yoyogames.com/tech_blog/87


In the latest updates to the Early Access version of GameMaker: Studio there have been some major additions to the audio functions:

  • New getter functions to get information about the state of a sound or the audio system
  • New listener functions to specifically target a given output like headphones or gamepad (on some targets)
  • New functions for streaming and recording audio using an audio buffer.

The first two new features are pretty self explanatory and easy enough to use (just check the manual beforehand), but the recording audio and using audio buffers functions may be confusing at first to some users, and so in this tech blog we are going to cover this new functionality and create a basic test app so you can get some "hands-on" experience with them.



  • 2



#2 ShadeSpeed


    Procedural Generation King

  • GMC Member
  • 771 posts
  • Version:GM:Studio

Posted 01 December 2014 - 10:06 PM

I'm trying to draw a wave of the sound recorded.


I've created a local variable that the temporary buffer if copied across to, but when drawing this wave, do I sample every byte, two bytes or 4 bytes? Using a single byte seems to show either loads of static, or what I assume to be the second byte of precision for what should be a 16 bit sampling?




A small GMZ to show sound wave visuals. https://www.dropbox...._Sound.gmz?dl=0

Edited by ShadeSpeed, 02 December 2014 - 12:55 AM.

  • 0

Marketplace Resources


code.png page.png video.png

#3 MitchBrits15


    Pixel Wizard

  • GMC Member
  • 359 posts
  • Version:GM:Studio

Posted 16 January 2015 - 03:59 PM

Uhhh I followed it, used it nicely as a Windows.exe to test, but it doesn't work in HTML5?


EDIT: Oooops, forgot to say how I actually found this helpful... and that it taught me how to use buffers :P

Edited by MitchBrits15, 16 January 2015 - 04:00 PM.

  • 0