(Doubt) Possibility of HCA or ADX audio support (CRI Middleware)

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
CharlieFuu69
Regular
Posts: 37
Joined: Mon Nov 11, 2019 10:32 pm
Projects: WIP: LoveLive! UNOFFICIAL PROJECT (Gacha/Rhythm game developed in Ren'Py engine)
Github: CharlieFuu69
itch: https://charliefuu69
Location: Chile
Contact:

(Doubt) Possibility of HCA or ADX audio support (CRI Middleware)

#1 Post by CharlieFuu69 »

Hello everybody.

In this instance I want to ask you for help with a question rather than a problem, although I would appreciate that someone more experienced in Ren'Py / Python can give me some indication.

A few months ago I acquired the equipment from CRI Middleware (CRIWARE), with tools that are used to encode audio and video, although at the moment I am interested in encoding audio. My idea behind this was to convert my current audio files into HCA or ADX format (both codecs provided by CRIWARE), and the reason behind this is that the audio formats that Ren'Py allows are very accessible by anyone person who can unpack the RPA files. At least I want to make accessing the audio files a bit more difficult. The point, it is obvious that Ren'Py does not support HCA or ADX audios.

Given this, I decided to investigate and then I found that Ren'Py uses the "ffmpeg" library to deal with audio files, and that gave me a little light of hope since according to the library's website, / encoding is supported CRIWARE HCA and ADX audio decoding.

Source: https://www.ffmpeg.org/general.html#Audio-Codecs

The point is this. What part of Ren'Py handles audio files? Or, if possible, how can I make Ren'Py able to read and play HCA audio?
I've seen on GitHub that there are HCA to WAV converters with code written in Python, but I think I need a more accurate hint to be able to implement what I want in my game.

Any answer will be very helpful to me to achieve what I want.

Thanks for reading: 3
Last edited by CharlieFuu69 on Sat Jul 03, 2021 1:39 am, edited 1 time in total.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: (Doubt) Possibility of HCA or ADX audio support (CRI Middleware)

#2 Post by PyTom »

I don't have any plans to make builds of Ren'Py that support other audio formats.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
CharlieFuu69
Regular
Posts: 37
Joined: Mon Nov 11, 2019 10:32 pm
Projects: WIP: LoveLive! UNOFFICIAL PROJECT (Gacha/Rhythm game developed in Ren'Py engine)
Github: CharlieFuu69
itch: https://charliefuu69
Location: Chile
Contact:

Re: (Doubt) Possibility of HCA or ADX audio support (CRI Middleware)

#3 Post by CharlieFuu69 »

There is no problem that the developer of the engine decides not to include support for more audio codecs, rather, the idea was to try to set up its own system to handle the HCA / ADX audios, so that it could be defined as:

Code: Select all

define audio.song_01 = AudioData("bytes", "fn")
And be able to reproduce them as:

Code: Select all

play music song_01
In the hypothetical case that you managed to get the audio bytes from an HCA / ADX file, could you use AudioData () to record those bytes as a playable music track?

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: (Doubt) Possibility of HCA or ADX audio support (CRI Middleware)

#4 Post by PyTom »

Not directly. You could probably slap RIFF headers on the front, and make it into a signed 16-bit wav file, and pass that to AudioData.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
CharlieFuu69
Regular
Posts: 37
Joined: Mon Nov 11, 2019 10:32 pm
Projects: WIP: LoveLive! UNOFFICIAL PROJECT (Gacha/Rhythm game developed in Ren'Py engine)
Github: CharlieFuu69
itch: https://charliefuu69
Location: Chile
Contact:

Re: (Doubt) Possibility of HCA or ADX audio support (CRI Middleware)

#5 Post by CharlieFuu69 »

Those few words are serving me too much. These were the clues he needed to achieve what he wanted. Thanks PyTom!
When I get good results, I am going to put a little tutorial in this post. It will serve more than one of them to "obfuscate" the assets of their games a bit.

Post Reply

Who is online

Users browsing this forum: MagicBuns, RandomHuman64