Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Audio Module
#1
Audio Module (C++ / SFML)
Version 0.2

Description

This is a C++ rewrite of the RPG Maker Audio module implemented with Simple and Fast Multimedia Library by Laurent Gomilla and team.

The end user is responsible for compiling and deploying this in their project. I may provide a plug-n-play DLL later but for now its all on you to figure it out.

The system is written to RGSS3 specifications (and should be backwards compatible with RGSS and RGSS2 since all it does is add features and doesn't change fundamentals.) I have not implemented this in Ruby or any of the RPG Maker systems. It might be awhile but I will get back to that at a later date.

Features
  • Supports multiple filetypes; wavoggflac, probably others.
  • Play 1 Background Music
  • Play 1 Background Sound
  • Play 1 Music Effect
  • Play multiple Sound Effects
  • Adjust fade in/fade out timing of Music Effects
  • Available Functions : Play, Pause, Stop, Fade In/Out, Replay, Volume=, Pitch=
  • Please see SFML/Audio for more information.

(NOTE: Lack of mp3 support is a legal issue, apparently. This is outside the scope of my script and more related to SFML. End user is responsible for implementing their own mp3 support, if desired. (I find ogg to be a better format, personally. Ogg BGM and BGS seem to loop better than mp3 so I actually encourage people to switch formats.))

Requirements
  • SFML (Simple and Fast Multimedia Library)
  • Should only require SFML/Audio (for audio) and SFML/System (for sf::Time functionality). See header file for more details.
  • Working knowledge of C++ and the build tools required to compile and run it.

Instructions

This is NOT a plug-n-play RPG Maker script, you'd need to compile it yourself with C++ and configure it to your needs.
While this is designed to be RGSS compliant, it has not been implemented in Ruby/RPG Maker.
I'm just sharing it for anybody who can do something with it.
If I get the C++ and Ruby to communicate, I will return with a full plug-in-play implementation anyone can use.

Content Hidden

Differences from Original RGSS

There are minor differences between this and the vanilla RGSS, RGSS2 and RGSS3 implementations (personal taste)...
  • When playing Music Effects, all other audio (BGM, BGS, SE) fade out in 2 seconds instead of instant.
  • When playing Music Effects, the volume of all other audio is reduced to 10 instead of 0.
  • When playing Music Effects, the volume fades in approximately 4 seconds. Adjustable.
  • These timing features should be easily adjustable by changing the member variable values in the header file.
  • NOTE: The Fade Out for music effects should be a minimum of 1.0f or it won't fade out at all. Of course, you can edit the script yourself if you're trying to do, say, a half second.

Source Files

RGL/Audio.hpp
Content Hidden

RGL/Audio.cpp
Content Hidden

Author's Notes

Notes : Classes and Memory

Content Hidden

Notes : What Could Be Improved?

Content Hidden

Notes : About (lack of) rbSFML Bindings

I am well aware that there is a SFML bindings for Ruby (rbSFML). It doesn't look like it has been updated in 6 years and I don't know if anybody still uses or supports it, nor do I know how stable it is. The SFML forum doesn't have a sub-forum for it in their bindings so I can only assume rbSFML may not be a stable library? I made the personal choice to do this without rbSFML. I would like to learn for myself how to extend Ruby with C++ so it was a personal choice to do it in C++.

Thank you for checking it out, feel free to lend me a hand if you know anything about this stuff.

Terms and Conditions

End user is responsible for figuring out how to compile and use this themselves. I will only be providing limited support and future updates.
Free to use in commercial and non-commercial projects, you don't even have to credit me (but I do like credits -_^).
SFML has its own terms under the ZLIB/PNG License. SFML is an open source multimedia library written by Laurent Gomilla and a team of programming ninjas.
[Image: Button-BOTB.png]
[Image: Save-Point.gif][Image: Button-You-Tube2.png][Image: Button-Sound-Cloud2.png][Image: Button-Audio-Mack2.png]
[Image: LS-Banner.gif]
NEW ALBUM OUT NOW!

Reply }


Messages In This Thread
Audio Module - by Kain Nobel - 01-23-2022, 02:47 PM
RE: Audio Module (C++ / SFML) - by kyonides - 01-24-2022, 02:09 AM
RE: Audio Module - by Kain Nobel - 01-25-2022, 11:39 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Kichi's Kached Audio DerVVulfman 2 7,292 08-21-2023, 11:01 PM
Last Post: DerVVulfman
   Audio Module Rewrite mcisendstring DerVVulfman 25 35,126 05-03-2020, 08:08 PM
Last Post: MikiIsAway
   Missing Audio Replacer LiTTleDRAgo 1 5,118 06-11-2017, 12:25 AM
Last Post: Whisper
   NRGSS Module Function Library Narzew 3 7,424 09-18-2012, 10:44 PM
Last Post: Narzew
   Audio Settings EJlol 1 5,726 07-03-2012, 09:36 PM
Last Post: Erechel
   Victor Engine - Basic Module Victor Sant 0 5,742 12-21-2011, 07:46 AM
Last Post: Victor Sant
   JEM: Jennifer's Entry Module DerVVulfman 0 4,824 10-14-2010, 04:30 AM
Last Post: DerVVulfman
   Module VirtualKeys zecomeia 0 4,708 03-14-2010, 01:25 AM
Last Post: zecomeia
   Audio File Encryption Dark-Yen 0 4,723 03-08-2008, 06:35 AM
Last Post: Dark-Yen
   Profession/Offices Module EX-PLUS! Mephistox 0 4,439 03-07-2008, 06:54 AM
Last Post: Mephistox



Users browsing this thread: