top of page
Search

[93] Fixed Units

  • Writer: Conlan Walker
    Conlan Walker
  • Aug 24, 2023
  • 2 min read

I didn't have much time on Monday, and I had no time on Tuesday, so this diagram is about all I did within the span of those 2 days. It shows at a very basic level what kmixer is doing with its voices, and how they can output to another voice, instead of just the audio device.

ree

The rest of the work was done on Wednesday and Thursday.


_kit_kmixerPrivate.h got some new additions:

I realized that since the operations included with kmixerVoice are pretty modular, I can create the fallback routine first, and finish the rest of kmixer before adding in the fancy SIMD instructions. So after removing them for now, I worked on finishing up the VoiceProc thread routine, as well as the mixing routine.

After that, I created a test that audits the calculations for each stream operation, comparing each given value to what it should've been. This will be especially useful when I want to add in the SIMD instructions later, though it did help me find a few bugs in the fallback itself.

I started chipping away at the stuff related to devices.

This will manage the thread pool that processes each stage, as well as allow for the creation and destruction of device structs, alongside some other stuff probably.


And some minor additions to kit_sdl2_kmixer.c.

kmixer (stylized as lowercase) itself has 2 components. The first is the framework that allows for management of real-time streams, and the second is the actual asynchronous mixer portion that sits on top of that framework. The latter will be put in this source file, once the former is finished.


When converting from float to int and back, there is a tiny bit of data loss. This is partially a product of the method of conversion, but also the fact that you can't realistically convert a 32-bit signed integer to a float and back without a bit of loss.

I made a small program that can calculate the maximum error, which turns out to only be 64 on either side. Not bad, but not nonexistent either.



I'll mainly focus on device stuff next week, and maybe a bit of the mixer if I have time.

 
 
 

Comments


bottom of page