Game Engines - Phyre Engine Audio
So we've been working on our game with the Phyre engine, picking away at points we needed at the time from the documentation and trying our best to understand the inner workings of Phyre through the documentation and trial and error, when we realized we needed to have an important GDW milestone with audio in it. So we thought that since there is supposed working audio examples included with the engine documentation, it shouldn't be too bad. This would be the case if the samples actually worked and there was actual documentation about the tools needed when managing audio assets.
When we first began tackling the audio problem, we were making sure that the audio sample was actually set up properly. Cleaning the assets Phyre assets, reprocessing them, and rebuilding the solution all had no effect on the situation. So we took to deeply analyzing the assets that were being loaded in.
First we made sure that all the FMOD dependencies were for sure being located properly through the proper environment variable, since the media files are FMOD related.
Our next step was ensuring that all the audio defines were set up for the engine. We took to the getting started documentation and found that you do indeed need to uncomment an audio define in one of the core engine dependency files. By now we were sure that we fixed it, so we rebuilt the core dependencies that look for the audio define expecting to hear audio, but still nothing. No errors, not even output.
So we continued our debugging quest, analyzing the data that the sample was trying to load in, to find that Phyre asset processor was not properly converting the audio asset project folder (FMOD) to Phyre type. The processor is run during prebuild to check if the assets have been converted to Phyre runtime data or not, and if the asset is not present, then the processor is responsible for converting the media to runtime readable data. We discovered that the input file that was being passed to the asset processor was around 4 MB. To be expected with the compressed sound effects that were used, but when found that the output was 2 kb, something was obviously going wrong.
The audio asset type that Phyre uses is .fdp, which when looking in the source for the Phyre asset processor in the prebuild step, is the only file type that the processor accepts to process FMOD audio.
Doing some research, .fdp (opens as simple XML) is a project file created from the FMOD designer program. It contains references to sound banks and events, which the Phyre docs says is mandatory for audio to be initialized, but doesn't say that only the .fdp is needed
So we created a new .fdp with the FMOD designer by importing the sample media files and setting the FMOD audio properties on each sound bank, and then included it in the phyre project linking it for the asset gather in the assets.xml. Still with no success, we fell back to debugging the actual Phyre asset processor.
Shortly after, we started receiving output from Phyre asset processor when we compiled it with debug, this was a gold mine since we could finally pinpoint what was going wrong when trying to convert this audio project to Phyre runtime. We finally found the error that guided us towards fixing it.
The asset processor was outputting that the FMOD Designer command line .exe not found. It turns out that Phyre expects the FMOD Designer installation to be placed in the externals folder, so that the .fdp files, can be modified with the actual FMOD Designer command line for Phyre specific tweaks that are needed just before converting and packaging as Phyre runtime media.
Lastly, we finally succeeded in working audio by copying the .dll's and .exe's over to the external folder for Phyre, defining the enable audio definition in the Phyre includes header file, and then recompiling both the Phyre class layout and the Phyre asset processor. Even though the documentation did not mention any of this... it now works successfully!
When we first began tackling the audio problem, we were making sure that the audio sample was actually set up properly. Cleaning the assets Phyre assets, reprocessing them, and rebuilding the solution all had no effect on the situation. So we took to deeply analyzing the assets that were being loaded in.
First we made sure that all the FMOD dependencies were for sure being located properly through the proper environment variable, since the media files are FMOD related.
Our next step was ensuring that all the audio defines were set up for the engine. We took to the getting started documentation and found that you do indeed need to uncomment an audio define in one of the core engine dependency files. By now we were sure that we fixed it, so we rebuilt the core dependencies that look for the audio define expecting to hear audio, but still nothing. No errors, not even output.
So we continued our debugging quest, analyzing the data that the sample was trying to load in, to find that Phyre asset processor was not properly converting the audio asset project folder (FMOD) to Phyre type. The processor is run during prebuild to check if the assets have been converted to Phyre runtime data or not, and if the asset is not present, then the processor is responsible for converting the media to runtime readable data. We discovered that the input file that was being passed to the asset processor was around 4 MB. To be expected with the compressed sound effects that were used, but when found that the output was 2 kb, something was obviously going wrong.
The audio asset type that Phyre uses is .fdp, which when looking in the source for the Phyre asset processor in the prebuild step, is the only file type that the processor accepts to process FMOD audio.
Doing some research, .fdp (opens as simple XML) is a project file created from the FMOD designer program. It contains references to sound banks and events, which the Phyre docs says is mandatory for audio to be initialized, but doesn't say that only the .fdp is needed
![]() |
| Looking for hints in the .fdp file |
So we created a new .fdp with the FMOD designer by importing the sample media files and setting the FMOD audio properties on each sound bank, and then included it in the phyre project linking it for the asset gather in the assets.xml. Still with no success, we fell back to debugging the actual Phyre asset processor.
Shortly after, we started receiving output from Phyre asset processor when we compiled it with debug, this was a gold mine since we could finally pinpoint what was going wrong when trying to convert this audio project to Phyre runtime. We finally found the error that guided us towards fixing it.
The asset processor was outputting that the FMOD Designer command line .exe not found. It turns out that Phyre expects the FMOD Designer installation to be placed in the externals folder, so that the .fdp files, can be modified with the actual FMOD Designer command line for Phyre specific tweaks that are needed just before converting and packaging as Phyre runtime media.
Lastly, we finally succeeded in working audio by copying the .dll's and .exe's over to the external folder for Phyre, defining the enable audio definition in the Phyre includes header file, and then recompiling both the Phyre class layout and the Phyre asset processor. Even though the documentation did not mention any of this... it now works successfully!



Comments
Post a Comment