Successfully added to new project, but what we don’t like so far - to create sounds bank we should use wav files which are x10 bigger then mp3 files, also they streaming audio function seems doesn;t work oe we doing something wrong.
Is there any production app with it, maybe someone have more info about this engine and how to handle audio formats and size for it?
According to the docco “16-bit PCM: This is the default format. The data is uncompressed, so it requires very few CPU cycles to play, but uses 2 bytes per sample per channel (about the same as a typical uncompressed .wav or .aiff file).
8-bit PCM: Also uncompressed, but only uses 1 byte per sample per channel (half the space of 16-bit PCM), and lower audio quality.
ADPCM: A compressed format that requires somewhat more CPU cycles to play, but requires 1/3 of the space of 16-bit PCM. Audio quality is typically somewhat worse than 16-bit PCM but better than 8-bit PCM. Samples are packed in blocks of 36 samples (24 bytes).”
also
*"The most portable formats for a stream sound are:
.ogg (Ogg Vorbis)
.cks
These formats are supported on all platforms, including Windows and OS X, and we recommend that you use them for most purposes.
Files in the .cks format are created using cktool; the audio data can be in the same formats supported by bank sounds (16-bit PCM, 8-bit PCM, or ADPCM).
Streams can also be in other audio file formats; support for these varies by platform. Currently, the following additional formats are supported on both iOS and Android:
.wav (uncompressed, or with �-law or a-law compression)
.mp3
.mp4 (AAC compression)
.m4a (AAC compression)
The iOS version can read the following additional audio file formats:
.aac, .adts (AAC compression)
.aiff, .aif, .aifc
.caf
.m4a (Apple Lossless compression)
.snd, .au (uncompressed, or �-law compression)
.sd2
The Android version can read the following additional audio file formats:
.amr
"*
Yeah, we were trying to create bank and it was accepting only wav files, mp3 files was showed as error. So we converted 35kb mp3 to 334kb wav and it used it as it is without any compression - so I think it little to much space.
Regarding stream sounds - it just not playing any file we passing, was trying wav, mp3, cks - maybe there is some issue in latest SDK version or something not mentioned in tutorial? It all the time was saying sound not ready… Have you managed to stream sounds?
Yes I use .ogg stream sounds without any problem. Stream sounds are not instantly ready so obtaining information about them before they are loaded is not recommended, but the message about it not being ready doesn’t mean there is an error (at least I don’t think). I use it like this and it works as intended:
Bank sounds have the same size as the sum of the wav files put into them because there is not much compression going on. In the other hand playing sounds from banks is instantaneous and cheap.
Removed support for Visual Studio 2012 on Windows.
Fixed sample rate problem on iPhone 6s.
So there is no changelog lol. Seems like it’s not a stable release or not a release at all, weird. Just use 1.6.1. If you send them an email I’m sure they would tell you about this and/or point you to a location to download 1.6.1
The gist of it is for the Windows one, I added the CkConfig stuff to AppDelegate’s init, added the CkUpdate to my main updateloop in a scene, added some audio ogg files, then added ..\Classes\cricket_audio\inc; to my compiler include, since the entire cricket install was put there, and the library linker whatever was `$(SolutionDir)…\Classes\cricket_audio\lib\win\vs12.0$(PlatformTarget)\DebugDynamic\ck.lib; Didn’t need to mess with any preprocessors, just needed to make sure my lib was matching my debug status and the library’s compiler version matched my own.
For the android part, and this is where I really don’t understand, it seems like I added two C++ files that the JNI uses at hellocpp/CricketAndroidJni.cpp and hellocpp/CricketAndroidJni.h' as aLOCAL_C_INCLUDES` addition, marked the cricket library as a static library similar to how Magic Particles did it, and in the Java activity it makes a call out to that external JNI’s code in the two C++ files.
I hope there’s something in my commits that can help you guys.
It sounds to me like you are missing a reference. I recall this happens with things like rand, etc. Perhaps an Android specific forum might get you a faster answer.
Hey, we also integrated cricket audio engine into ios and android game. Regarding that abs stuff for us looks that developers of sdk wrongly compiled it, we had exactly same issue when compiled as debug build, u should use release libs and compule in release mode build then it will works. Also could u please write to cricket audion engine support saying about this issue. We contacted them already but they think that our envirnment setup incorrect not their code, so your exactly same issue just proves that they did wrong compile of lib on their side
I am working on a fix and a new version of Cricket Audio will be released when I have one. I believe the problem lies with the fact that those math functions are inlined in some versions of the NDK and not in others. As @energyy says, release builds seem to work, and at least one developer has said that it worked for him when he compiled with the minimum SDK version set to 19.
Cricket Audio 1.6.6b update released
Posted on March 22, 2018 by steve
This minor update fixes a link error on Android when targeting older OS versions with the NDK.
We tested your sent lib and it seems worked correctly now