nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches
tone.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
11#ifndef __TONE_H__
12#define __TONE_H__
13
21#include <stdint.h>
22#include <stddef.h>
23
43int tone_gen(int16_t *tone, size_t *tone_size, uint16_t tone_freq_hz, uint32_t smpl_freq_hz,
44 float amplitude);
45
65int tone_gen_size(void *tone, size_t *tone_size, uint16_t tone_freq_hz, uint32_t sample_freq_hz,
66 uint8_t sample_bits, uint8_t carrier_bits, float amplitude);
67
72#endif /* __TONE_H__ */
int tone_gen(int16_t *tone, size_t *tone_size, uint16_t tone_freq_hz, uint32_t smpl_freq_hz, float amplitude)
Generates one full pulse-code modulation (PCM) period of a tone with the given parameters.
int tone_gen_size(void *tone, size_t *tone_size, uint16_t tone_freq_hz, uint32_t sample_freq_hz, uint8_t sample_bits, uint8_t carrier_bits, float amplitude)
Generates one full pulse-code modulation (PCM) period of a tone with the given parameters.