-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from larus-breeze/work
Work
- Loading branch information
Showing
11 changed files
with
470 additions
and
378 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* microphone.h | ||
* | ||
* Created on: Jun 22, 2024 | ||
* Author: schaefer | ||
*/ | ||
|
||
#ifndef CUSTOM_MICROPHONE_H_ | ||
#define CUSTOM_MICROPHONE_H_ | ||
|
||
// byte samples come with 2.625 MHz / 8 = 328.125 kHz | ||
// resampling by 32 gives 10.254 kHz | ||
#define RESAMPLING_RATIO 32 | ||
#define NUM_BUFFERS 2 // double buffered for DMA and for uSD writing | ||
#define MIC_DMA_BUFSIZE_HALFWORDS 4096 // filled after 50ms | ||
#define MIC_DMA_BUFSIZE_BYTES (MIC_DMA_BUFSIZE_HALFWORDS * sizeof(uint16_t)) | ||
// the sample buffer contains 512 bytes sampled at 10.254 kHz | ||
// acquisition time 50ms -> 20 Hz min freq. | ||
#define SAMPLE_BUFSIZE (MIC_DMA_BUFSIZE_BYTES / RESAMPLING_RATIO) | ||
#define SAMPLE_BUFSIZE_HALF (SAMPLE_BUFSIZE / 2) | ||
|
||
extern Queue <uint8_t *> mic_data_pointer_Q; | ||
extern int8_t audio_samples[2][SAMPLE_BUFSIZE]; | ||
|
||
#endif /* CUSTOM_MICROPHONE_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule lib
updated
from aaa49a to 65a7d5