AudiosPlugin is a Godot iOS Audio Plugin that resolves the audio recording issue in iOS for Godot Engine.

Overview

Godot-iOS-Audio-Plugin (AudiosPlugin)

This plugin solves the Godot game engine audio recording and playback issue in iOS devices. Please open the Audios Plugin XCode Project and compile the project. You can also use the libaudios_plugin.a binary in your project.

Easy Integration Steps

  1. Unzip the Godot.zip file to Godot folder for Godot's header files. You can generate the latest Godot header files. See Getting Godot engine headers below.
  2. Open the XCode Audios Plugin project in XCode and compile.
  3. Copy libaudios_plugin.a and audiosplugin.gdip to your Godot project's ios folder.
  4. Initialize the Audios Plugin in ready function as follows:
var audiosPlugin = null

func _ready():
if Engine.has_singleton("AudiosPlugin"):
		audiosPlugin = Engine.get_singleton("AudiosPlugin")
		var ret = audiosPlugin.init()
		print("iOS plugin is available %d", ret)
	else:
		print("iOS plugin is not available on this platform.")
   
     # Your other initialization code
end
  1. Start recording:
  if audiosPlugin != null:	
	audiosPlugin.recordAudio()
  1. Stop recording and play
if audiosPlugin != null:
  audiosPlugin.stopAudio()
  audiosPlugin.setTempo(value)  #Set pitch of the recording while playing (optional)
  audiosPlugin.playAudio()

  1. Disable "Enable Audio Input" from Godot project settings (Project->Project Settings->Audio) in order to prevent runtime crash. This plugin gets the microphone permission itself.
  2. Enable the iOS Godot Plugin when exporting the project and PCK file from "Project->Export" menu

Methods

Audiosplugin();
Error init() : initialize the Audios plugin
void recordAudio() : Start recording audio
bool isRecording() : Check if recording audio
void playAudio()   : Play the recorded audio
void stopAudio()   : Stop recording and playing
void setTempo(float val) : Set tempo of the recording while playing. 
1.0 is the original tempo. 2.0 is 2x. 0.5 is 1/2x. The tempo also changes pitch.

Godot iOS Audio Plugin Advanced Setup

This repo contains a Xcode and SCons configuration to build an Godot Audio plugin for iOS. Xcode project and Scons configuration allows to build static .a library, that could be used with .gdip file as Godot's plugin to include platform functionality into exported application.

Initial setup

Getting Godot engine headers

To build iOS plugin library it's required to have Godot's header files including generated ones. So running scons platform=iphone target= in godot submodule folder is required.

Working with Xcode

Building project should be enough to build a .a library that could be used with .gdip file.

Working with SCons

Running scons platform=ios arch= target= target_name= version=<3.2|4.0> would result in plugin library for specific platform. Compiling for multiple archs and using lipo -create .. -output .. might be required for release builds.

Please see my website and apps:

I develop Android, iOS and Windows applications. Please see my website: https://www.audiosdroid.com

audiosdroid.com

Sponsorship

I developed an iOS Audio Godot plugin to resolve the audio recording issue in iOS devices for your use. You can freely use this plugin source code in your project with MIT License. Please support me by donating:

paypal

You might also like...
Audio Filters on iOS and OSX

Audio Filters on iOS and OSX Implement high quality audio filters with just a few lines of code and Novocaine, or your own audio library of choice. NV

AudioPlayer is syntax and feature sugar over AVPlayer. It plays your audio files (local & remote).

AudioPlayer AudioPlayer is a wrapper around AVPlayer. It also offers cool features such as: Quality control based on number of interruption (buffering

Beethoven is an audio processing Swift library
Beethoven is an audio processing Swift library

Beethoven is an audio processing Swift library that provides an easy-to-use interface to solve an age-old problem of pitch detection of musical signals.

FDWaveformView is an easy way to display an audio waveform in your app
FDWaveformView is an easy way to display an audio waveform in your app

FDWaveformView is an easy way to display an audio waveform in your app. It is a nice visualization to show a playing audio file or to select a position in a file.

SwiftAudioPlayer - Swift-based audio player with AVAudioEngine as its base

SwiftAudioPlayer Swift-based audio player with AVAudioEngine as its base. Allows for: streaming online audio, playing local file, changing audio speed

YiVideoEditor is a library for rotating, cropping, adding layers (watermark) and as well as adding audio (music) to the videos.

YiVideoEditor YiVideoEditor is a library for rotating, cropping, adding layers (watermark) and as well as adding audio (music) to the videos. YiVideoE

App for adding and listening audio files
App for adding and listening audio files

SomeSa SomeSa (самса) – приложение, позволяющее загружать и воспроизводить произвольные аудиофайлы. Протестировано на форматах файлов .wav и .mp3, раз

A drop-in universal library allows to record audio within the app with a nice User Interface.
A drop-in universal library allows to record audio within the app with a nice User Interface.

IQAudioRecorderController IQAudioRecorderController is a drop-in universal library allows to record and crop audio within the app with a nice User Int

Audio visualisation of song
Audio visualisation of song

SonogramView Audio visualisation of song Requirements iOS 8.0+ macOS 10.10+ Xcode 8.0+ Installation: Manually First Check SonogramView.swift or MacSon

Releases(v1.0.0)
Owner
I develop Android, iOS and Windows applications using Java, C++, Objective C and C#.
null
The Amazing Audio Engine is a sophisticated framework for iOS audio applications, built so you don't have to.

Important Notice: The Amazing Audio Engine has been retired. See the announcement here The Amazing Audio Engine The Amazing Audio Engine is a sophisti

null 523 Nov 12, 2022
An iOS and macOS audio visualization framework built upon Core Audio useful for anyone doing real-time, low-latency audio processing and visualizations.

A simple, intuitive audio framework for iOS and OSX. Deprecated EZAudio has recently been deprecated in favor of AudioKit. However, since some people

Syed Haris Ali 4.9k Jan 2, 2023
FDSoundActivatedRecorder - Start recording when the user speaks

FDSoundActivatedRecorder Start recording when the user speaks. All you have to do is tell us when to start listening. Then we wait for an audible nois

William Entriken 271 Nov 3, 2022
Porcupine is a highly-accurate and lightweight wake word engine.

Porcupine Made in Vancouver, Canada by Picovoice Porcupine is a highly-accurate and lightweight wake word engine. It enables building always-listening

Picovoice 2.8k Jan 7, 2023
科大讯飞语音识别插件 A plugin for xunfei dictation for iOS and Android.

xfvoice 科大讯飞语音识别插件 A plugin for xunfei dictation for iOS and Android. Install First, add xfvoice as a dependency in your pubspec.yaml file. Setting Se

canyonwan 1 Feb 18, 2022
AudioKit is an audio synthesis, processing, and analysis platform for iOS, macOS, and tvOS.

AudioKit is an audio synthesis, processing, and analysis platform for iOS, macOS (including Catalyst), and tvOS. Installation To add AudioKit

AudioKit 9.5k Dec 31, 2022
AudioPlayer is a simple class for playing audio in iOS, macOS and tvOS apps.

AudioPlayer AudioPlayer is a simple class for playing audio in iOS, macOS and tvOS apps.

Tom Baranes 260 Nov 27, 2022
Swift audio synthesis, processing, & analysis platform for iOS, macOS and tvOS

AudioKit AudioKit is an audio synthesis, processing, and analysis platform for iOS, macOS (including Catalyst), and tvOS. Installation To add AudioKit

AudioKit 8.7k Sep 30, 2021
Voice Memos is an audio recorder App for iPhone and iPad that covers some of the new technologies and APIs introduced in iOS 8 written in Swift.

VoiceMemos Voice Memos is a voice recorder App for iPhone and iPad that covers some of the new technologies and APIs introduced in iOS 8 written in Sw

Zhouqi Mo 322 Aug 4, 2022
Painless high-performance audio on iOS and Mac OS X

An analgesic for high-performance audio on iOS and OSX. Really fast audio in iOS and Mac OS X using Audio Units is hard, and will leave you scarred an

Alex Wiltschko 2.2k Nov 23, 2022