Hi I am a developer of video games and apps for Android and windows, hopefully soon for mac as well, I've been making video games for fun for about 14 years, and in February 2015 decided to get serious and started Roadhammer Gaming, a company aimed at producing video games and software for a fair amount of platforms. Future plans are to open a unique 3d immersed gaming facility, set up kind of like laser tag or paintball crossed with startrek's Holodeck to be open for business based on a set fee for a set amount of game play time. I am currently the owner and sole employee of my company. In my spare time I like hiking, motorsports, the beach, horror movies, sci fi movies and rpg style video games.

RSS My Blogs

GM Audio Save lets you move files, copy files, record from microphone, find music on android device and move and access your games included files for game moddability!
Useable in GMS 1x, GMS 2x and with any other extensions EXCEPT my extension GM Android Music, for that reason, all the functionality of GM Android Music is included in this extension.
Project minimum SDK is 11 or higher. This extension is also compatible with SDK 25+ permissions rules.

Screenshot 20171201 112955

Screenshot 20171201 113101

splash3

Features:
- Find music on Android device
- Move music files to public folder
- Set any music file to ringtone
- Make your own public game folders
- Get file extension type for audio files found
- Get the path address to audio files found
- Move music files and any file type recognized by GMS'S from the Included files folder of your game to a public folder
- Alert the Android operating system that a new file is available
- Record audio and save as .wav, .raw, .mp3 or set to ringtone
- Set any audio found or recorded as Android Device's default ringtone

A modder's note: GetFileExt("file_path"); can be used, for example, If you want to load some .ogg music files from the android device. You can use this function with gms' audio_create_stream function to get and mod the music and play/control it in-game, just check for music, parse the .ogg files, set them as your games playlist. Example:
Code:
var ext="";
global.nOfOggs= -1;//reset variable
global.audioadd="";//destroy array
for(var i=0;ifor(var i=0;i{ext=GetFileExt(TrackAdress(i));
if(ext= ".ogg" || ext= ".OGG")
{global.nOfOggs+=1;
global.audioadd[global.nOfOggs] = audio_create_stream(TrackAdress(i));}
}
newplay=1;//catch in step event to play all found .ogg sounds in game as playlist

Requirements:
Must have Gamemaker: Studio 1x or gamemaker Studio 2, and the Android module.
must use minimum SDK setting 11 or higher in your project.

Testing is easy, All the test code is in a script called tester. The 2 buttons to the right of the stereo are used to cycle through all the things you can test in the new part of the extension. The important object to test this demo game is object ctrlr in the Android music folder in the resource tree of the project. You can find the test controlls in the left pressed and left released events, and all the related working/modifiable code is in the script called tester.
if recording only or transfering files from your game's included files you don't have to press Y to bring up the music player. (to test functions 5 and 7 you still must bring up the music player with the Y button to load the music from the user's device of course)
When the app opens simply tap the 8ball, name your folder and press ok. When the game starts press Y to start the player and test the functions by pressing the up/down arrows to the right of the stereo. tap or hold (depending on the test) the stereo to perform the test.

The testable functions:
Test # 0 = record as wav and save to new folder, hold down on stereo while recording, release to stop recording.
Test # 1 = record as raw and save to new folder, hold down on stereo while recording, release to stop recording.
Test # 2 = record as wave and set as ringtone and save to ringtone folder, hold down on stereo while recording, release to stop recording.
Test # 3 = record as mp3 and save to new folder, hold down on stereo while recording, release to stop recording.
Test # 4 = Copy audio from device to new folder - music player must be open
Test # 5 = Copy audio from device and set as ringtone - music player must be open
Test # 6 = Copy audio, text and image from your game's included folder to new folder
Test # 7 = get file extension of tracks found on device, usefull to import music for game to play that has to be of the .ogg format for example - music player must be open
splash3.png ‚Äč
Details:

Other important objects:
obj_main: draws all the info text.
controller: sets up the permissions and all global variables, names folder on gamestart using the get_string_async dialog event.
obj_controller: make another/more folder(s) when pressed.

The functions:
TrackAdress(int); Returns absolute path of selected track number

StartRec(string,int); Name the file, select recorder type, example: "name.ext", 0 = wav, raw or ringtone. 1 = mp3. (mp3 recorder is different from wav/raw recorder)

StopRec(int); Save the file, 0 is for .wav, 1 is for .mp3, 2 is for set as ringtone and 3 is for .raw

GetFileExt("file_path"); is to get the file extension of any file, so for example if you have .ogg music files on your android device you can use this function with gms' audio_create_stream function to get and mod the music in-game.

SaveFromAs(string, string, string, int); This function has several uses, with it you can save music found on the device to a new folder, save files from your games included files to a new folder, set music from the device or your game's included files as the default ringtone for the device, so the format for using this function has 2 different setups and here are the examples:
if you are moving music found on the device to a new folder or setting one as a ringtone:
SaveFromAs(string, string, string, int); Input path, output path, file name, 0 or 1: 0 is move the audio file, 1 is move the file to the ringtones directory and set as the default ringtone.
If you are moving files from the included files of your game to new folder:
SaveFromAs(string, string, string, int); bytes data string,output path,file name,size in bytes
To use it you must create a buffer with the file stored in it and encode the data to string using the buffer_base64 gms function, then call the extension to do the rest, for example:
Code:
fname = "starter.wav";//Other included files to try: "startup.ogg" "test50.txt" "Saveimg.png"
if(file_exists(fname)){
file = file_bin_open(fname,0);
size = file_bin_size(file);
gameTransfer = buffer_create(1024, buffer_grow, 1);
for(var i=0;i buffer_write(gameTransfer, buffer_u8, file_bin_read_byte(file));
}
file_bin_close(file);}
var dataString = buffer_base64_encode(gameTransfer, 0, buffer_get_size(gameTransfer));
SaveFromAs(dataString,global.myFolder,fname,size);
} else {
show_debug_message("file open failed");
}
Note that only files recognized by GMS can be used, for example you CANNOT use .mp3 files because gms's buffers do not recognize them because .mp3 is copyright protected. Recognizable files include .wav, .raw, .ogg, .txt, .png and other image files.

GetFldr(string); "Folder_Name/More_floder_names" This function is used to get the output path to a public folder, you supply the name, and to make folders inside of folders just use the / character followed by the next folder's name.

OsUpdt(string); "folder address/file_name.ext" This function updates the android os of a new file so other apps on the device can find and use them.

FUNCTIONS FOR GM Android Music part of extension, usage info here::
PauseMusic() - pauses the music if playing
MusicStopped() - use to check if music is stopped
NumberOfTracks() - use to find number of tracks
ResumeMusic() - plays music if paused
PlayMusic(Track_Number) - play a particular song
GetCurrentSongName() - gets the currently playing song name
GetCurrentArtistName() - gets the currently playing artist name
MusicPlaying() - use to check if music is playing
NextTrack() - play the next song
PreviousTrack() - play the previous song
Init() - reset the player
GetSongName(Track_Number) - get the name of a particular song
GetArtistName(Track_Number) - get the name of a particular artist
MusicPaused() - use to check if the music is paused
StopMusic() - stop the music
GoToTrack(Track_Number) - go to a particular track, simillar to PlayMusic()
Final() - end all music and music player processes
GetSongLength(Track_Number) - gets the length in milliseconds of a requested song
GetCurrentSongLength(Track_Number) - gets the song length in milliseconds of the song currently playing
GoToSeek(Time_In_Milliseconds) - go to any position in the song by inputting the milliseconds
GetElapsedTime() - gets the time the song has been playing in milliseconds

Android 6+ permission functions:
CkRec() - Returns 0 if permission needed, 1 if already have it
CkWrite() - Returns 0 if permission needed, 1 if already have it
ShRes(String)
IMPORTANT!! DO NOT ask for WRITE_SETTINGS permission, and remove the last 3 permissions injected into the manifest
(double click extension and select android tab to view/change) if your app isn't going to allow user to change their ringtone!
as per the new google play rules and regulations stating that no app shall request permissions it doesn't use and/or need
Example for asking permissions for full featured extension use:
Code:
ShRes("RECORD_AUDIO WRITE_EXTERNAL_STORAGE WRITE_SETTINGS","for app to save, load, record & set audio as ringtone.");
Example for asking permissions for non ringtone modifying extension use:
Code:
ShRes("RECORD_AUDIO WRITE_EXTERNAL_STORAGE","for app to save, load, and record audio.");

Start a group Groups
Android Fans

Android Fans

478 members Hardware & Tech

If you are a Android user, lover, developer... don't wait, join us!

Tom Traggis

Tom Traggis

1 member Developer & Publisher

Hi I am a developer of video games and apps for Android and windows, hopefully soon for mac as well, I've been making video games for fun for about 14...

Comments
RoadhammerGaming Creator
RoadhammerGaming

Hello from Roadhammer Gaming! I'm currently working on a graphics app called Mergery, it's aimed at game developers graphics development mainly, but it has cool stuff for everyone! when finished I'm releasing it for Android and Windows. Here's a list of Mergery's features:

1. Load a background and a foreground image, with an option to switch which is which on the fly

2. Ability to turn the background on or off

3. Button style interface

4. Ability to edit either image

5 Effects menu with 8 main effects and several sub-effects + settings for canvas color and stamp effect

6. Ability to drag either image for positioning

7. Ability to save background or foreground or both background and foreground

8. Animated .PNG player capable of pause, play, step through each sub image with image # counter, increase/decrease speed with %age display

For the complete list of effects and what they do see Mergery's HOME PAGE
Roadhammergaming.blogspot.com

this is my first post about Mergery so I will be adding content and blogs soon, The project itself is 80 - 90% done, just working on the save options and screen vs objects scaling to properly work on Android!! The windows version was a breeze to make, I could probably release that version in a couple of days.

Here's a short video showing 3 of the line draw settings:
<iframe width="560" height="315" src="https://www.youtube.com/embed/_Kqp9-vSh2Q" frameborder="0" allowfullscreen></iframe>

Reply Good karma+1 vote
RoadhammerGaming Creator
RoadhammerGaming

<a href="http://www.indiedb.com/games/rhg-timecard" title="View Rhg Timecard on Slide DB" target="_blank"><img src="http://button.indiedb.com/popularity/medium/games/53776.png" alt="Rhg Timecard" /></a>

Self employed? Have a small buisiness and need a way to track your hours and your employees's hours? Rhg Timecard is the way to go!

Reply Good karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Level
Avatar
Avatar
Last Online
Country
United States United States
Friends
Become friends
Member watch
Follow
Statistics
Rank
6,069 of 646,051
Visitors
1,363 (3 today)
Time Online
1 day
Activity Points
515
Comments
10
Tags
1
Site visits
384
Contact