Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
config.hpp
- Committer:
- bikeNomad
- Date:
- 2013-06-17
- Revision:
- 0:84aaade0de8f
- Child:
- 1:9b1f3eb204ac
File content as of revision 0:84aaade0de8f:
#ifndef __included_config_hpp
#define __included_config_hpp
// configuration for Billy Bass
#define MAX_FISH 2
// SD card layout: all files in BASS_DIRECTORY ("/sd/SD_Files/")
//
// Each pair of files in that directory are named like:
// "<seqnum>_<fishnum>_filename.raw" (16-bit mono raw little-endian samples, sample rate=SAMPLE_RATE_HZ)
// and
// "<seqnum>_<fishnum>_filename.txt" (tab-separated text file with starttime,endtime,<mouth|head|body|tail>
// text files are as exported from Audacity's label tracks
//
#define SD_NAME "sd"
#define SD_ROOT "/" SD_NAME
#define BASS_DIRECTORY SD_ROOT "/SD_Files"
// length of BASS_DIRECTORY without NUL
#define BASS_DIRECTORY_LENGTH 12
#define MAX_BASENAME_LENGTH 30
#define MAX_PATH_LEN \
BASS_DIRECTORY_LENGTH + 1 \
+ MAX_BASENAME_LENGTH + 1
// Sample configuration
typedef int16_t Sample_t; // 16-bit raw, LE samples
const float SAMPLE_RATE_HZ = 8000.0;
const unsigned SAMPLE_PERIOD_USEC = (unsigned)(1.0e6/SAMPLE_RATE_HZ);
// Player configuration
const size_t BUFFER_SIZE = 512;
const size_t SAMPLES_PER_BUFFER = BUFFER_SIZE / sizeof(Sample_t);
const float SECONDS_PER_CHUNK = SAMPLES_PER_BUFFER / SAMPLE_RATE_HZ;
#define SERIAL_BAUD 115200
#define ANALOG_OUTPUT_BIAS 0x8000
#endif