Black - also have colors XD
Create encrypter to scam ppl for money - is Dark Black,
Find exploit in Google product and sell it on black market - is Light Black.
(because official Google some times can give you 500$ max or even āWe take it - Thanksā)
Debugged and got working some code to take an .ogg file (ogg/vorbis) and turn the PCM contents into a float[] array. Am using the JOrbis library and based the code on two decoding examples (one a ātutorialā) that come packaged with the library. Itās not the most efficient, as Iām opening the file twice, once to get a length in frames for the target array, the other for the actual data extraction, and some changes I made in loop nesting may make it a couple microseconds slower than its true potential.
Iām unclear on which of the example authors need to be acknowledged. Use of the library itself requires a license, that is clear. The copied code is basically the setting up of the main variables and loops, and is very similar in both examples (two different authors, neither acknowledging the other). Their code is nearly identical except they name their variables differently. I vary by dropping all the code pertaining to converting the extracted normalized floats to bytes. (I am neither outputting bytes to System.out nor playing back the audio as the two examples do). I also alter the nesting of a couple inner loops to make it simpler to transfer the data channels into the target float[].
If this code is useful to anyone, I can post it, but I want to handle the license and permissions stuff correctly.
How do I know how many channels the audio stream is comprised of?
Maybe you could return float[][] or an actual POJO with some meta-data like sample-rate.
Transforming all samples into floats, only to have them converted into bytes/shorts again to play it seems a bit cumbersome. It may also be disadvantageous to be forced to decompress the entire file before you can play it. For long audio files this means significant decoding time and serious memory usage (especially due to the floats).
@Riven
Good points. I could see where that would make the code I just wrote more generally useful. It would not be hard to do if there is a use or request.
āHow do I know how many channelsā¦?ā I have been assuming the programmer and the sound designer have an agreement to stick to a single format or set of formats. Audacity works great for converting formats. Iāve actually been prepping wildlife cues (owls, foxes, crows, woodpecker, wind-in-trees) for the last few hours. My last step is to convert to āCD-qualityā wav, then turn that to ogg/vorbis.
As far as I can tell, OGG/Vorbis works with audio data in the form of normalized PCM floats. Conversion to shorts or bytes happens after the decompression. I intercept the normalized float data before these later stages, as normalized floats are also format Iām using for most of my audio work. So actually a lot of thrashing is avoided.
The audio mixer I wrote expects normalized PCM floats. All synth output, clip-data, processing, mixing that I do happens with normalized floats. The conversion to bytes only occurs if the āwrapperā (bridging the audio mixer output to the sound system input) requires it. Android allows normalized floats for audio output as an option. Iām hoping to work soon with @ziozio who may have already written code that allows normalized floats to output via OpenAL as part of a OggVorbis decoder he previously wrote. I suspect his code does convert to bytes, but puts off the conversion to the last possible moment.
There is a lot I donāt know about memory management. I failed miserably earlier this evening when trying to read and understand Spasiās article on LWJGLās use of memory mgmt. Could use some coaching or recommended articles to get more background knowledge. I try to keep my learning on a need-to-know basis as otherwise there is no time for coding. But I really would like to know more about memory mgmt at this point.
Philfrei is correct, for vorbis the entire decoding is done using floats and is then converted to bytes when creating the byte buffer for openal
The float buffer is structured so that channel data is sequential so it would be channel1, channel2ā¦channel,channel1, channel2ā¦channel etc
As the float array is created during decoding you arenāt losing much and you arenāt using more memory. I do agree that a pojo is a good way to collate all the raw pcm data in to a separate object
What I did today⦠and yesterday and the day before:
Traveled (over night) ~1000 kilometres from south-germany (Mannheim) to north-germany (Hamburg), stayed at my girlfriends home for a night, had a job interview with auticon the next day, then traveled ~1000 kilometres back home right afterwardsā¦
Result:
Got both an internship and a job offer for a position as junior software developer.
Current Emotional State:
Pretty much dead, but happy.
June/July: Went on my first plane trip, luckily I donāt hate planes, as it was from Australia to Germany.
After arriving in Berlin Germany, we then had to travel to Leipzig via train.
All up it was about 26-ish hours of traveling.
Upon arriving in Leipzig, we immediately got asked to attend a open uni demonstration day for their compsci department. After visiting and looking at the projects some of their students are working on, we then began to realise the weird sun setting time, here in Australia in winter it begins to get dark at 5pm, and in summer it begins to get dark around 7pm-8pm. It was still light in Leipzig at 10:30pm, which threw us off a bit.
Instead of sightseeing, we mostly just sat in a hotel and played with robots for the first few days.
After a few days at Leipzig, RoboCup 2016 finally opened up to participants, and we moved from our small hotel rooms to the conference center.
We competed in the Humanoid Kid Size League (football / fuĆball / soccer), with us and one other team having the smallest robots in the league. As you can guess, we didnāt do too well with our small robots, we made it past the first knockout round, and got knocked out in the second round, just before the quarter finals. We ended up playing 5 or 6 games.
After we got kicked out, we played a ādrop in gameā where each team could place 1-2 robots on the side of the field they want to play for and work together to win a game against the other team, of course after being kicked out, our robots decided it was time they would perform better, and we played really well.
I also managed to meetup with Ra4kingās team one day, they donāt compete in the same league as us though. Unfortunately Ra4king did not attend the competition maybe next year if we both end up going?
Here is a picture of the entire Humanoid League (Kid Size, Teen Size and Adult League robots)