Files
Linus Torvalds 943ff07c28 Start the process of turning effects into stereo
This introduces the type 'sample_t' for a stereo floating point sample,
which explains why I called the integer i2s sample type 'raw_sample_t'.

The actual low-level effects aren't made to be stereo aware yet - that
will be a separate conversion stage, but now the core effects processing
loop works with stereo samples, and the USB audio is also in stereo.

When we encounter an actual effect, we just use the left channel, and
put the result in both the left and right channels.  So that currently
turns the whole signal mono, but you should be able to use this as a
stereo USB audio interface.

That is, if I got this all right.  I haven't tested things yet, because
I don't actually have any TRS input sources.  Silly me.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-07-22 18:05:10 -07:00

18 lines
318 B
C

#ifndef USB_AUDIO_H
#define USB_AUDIO_H
#include <stdint.h>
#include "audio/types.h"
int init_usb(void);
void usb_audio_task(void);
// Provide access to the output buffer
unsigned get_audio_samples(int32_t *buffer, unsigned nr);
// Read one sample from USB audio input
sample_t get_usb_audio_input(void);
#endif