Noise Nugget SDK
Loading...
Searching...
No Matches
noise_nugget.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Fabien Chouteau @ Wee Noise Makers
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
16#pragma once
17#include <stdint.h>
18#include <stdbool.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
46typedef void (*audio_cb_t)(uint32_t **buffer, uint32_t *stereo_point_count);
47
65bool nn_audio_init(int sample_rate,
66 audio_cb_t output_callback,
67 audio_cb_t input_callback);
68
77bool nn_enable_line_out(bool left, bool right);
78
88bool nn_enable_speakers(bool left, bool right, uint8_t gain);
89
104bool nn_set_line_out_volume(float L2L, float L2R, float R2L, float R2R);
105
114bool nn_set_adc_volume(float left, float right);
115
124bool nn_set_hp_volume(float left, float right);
125
141bool nn_set_line_in_boost(uint8_t line, uint8_t L2L, uint8_t L2R, uint8_t R2L, uint8_t R2R);
142
151bool nn_enable_mic_bias(void);
152
153#ifdef __cplusplus
154}
155#endif
bool nn_enable_mic_bias(void)
Enable microphone bias.
Definition noise_nugget.c:856
bool nn_enable_speakers(bool left, bool right, uint8_t gain)
Enable speaker amp.
Definition noise_nugget.c:756
void(* audio_cb_t)(uint32_t **buffer, uint32_t *stereo_point_count)
Defines a callback type for audio processing.
Definition noise_nugget.h:46
bool nn_set_hp_volume(float left, float right)
Set Headphone output volume.
Definition noise_nugget.c:798
bool nn_enable_line_out(bool left, bool right)
Enable line level output.
Definition noise_nugget.c:726
bool nn_set_adc_volume(float left, float right)
Set ADC (Analog to Digital Converter) volume.
Definition noise_nugget.c:781
bool nn_set_line_out_volume(float L2L, float L2R, float R2L, float R2R)
Set volume for line output (and speakers)
Definition noise_nugget.c:802
bool nn_set_line_in_boost(uint8_t line, uint8_t L2L, uint8_t L2R, uint8_t R2L, uint8_t R2R)
Set line input boost.
Definition noise_nugget.c:822
bool nn_audio_init(int sample_rate, audio_cb_t output_callback, audio_cb_t input_callback)
Initializes the audio system of the Noise Nugget board.
Definition noise_nugget.c:860