| Kinetis SDK Demo Applications User Guide 1.0.0-beta Freescale Semiconductor, Inc.

- Main Page
- Related Pages
- Demos

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
modulator.h File Reference
`#include <stdint.h>`
`#include "fsl_soundcard.h"`
`#include "fsl_sai_driver.h"`
`#include "fsl_sai_features.h"`
`#include "arm_math.h"`

Go to the source code of this file.

## Data Structures
struct | wave_header_t
struct | wave_file_t

## Macros
#define | WAVE_FILE_HEADER_SIZE
#define | WAV_PARTIAL_BUFFER_SIZE
#define | WAV_PI

## Enumerations
enum | wav_mods { kNoModulation, kSquareWave, kSawWave, kTriangleWave }

## Functions
void | modulator_init (void)
snd_status_t | get_wav_data (wave_file_t *waveFile)
snd_status_t | play_wav (uint32_t *pcmBuffer, uint8_t divider)
static void | send_wav (uint8_t *dataBuffer, uint32_t length, sai_data_format_t *dataFormat)
snd_status_t | play_mod_wav (uint16_t *pcmBuffer, uint16_t *modPointer, float32_t *fftData, float32_t *fftResult, uint8_t divider, uint8_t modulation, uint32_t srcSizeBytes, uint32_t sampleSize)
float32_t | get_wav_Hz (uint16_t *pcmBuffer, float32_t *fftData, float32_t *fftResult, uint32_t sampleSize)
uint32_t | mod_wav_data (uint16_t *pcmBuffer, uint16_t *modBuffer, float32_t *fftData, float32_t *fftResult, uint16_t startIndex, uint32_t sampleSize, uint8_t modType)
void | play_wav_arpeggio (uint32_t *arpeggioBuffer, uint32_t introLength, uint8_t divider)

## Data Structure Documentation

struct wave_header_t

Data Fields
uint16_t | bit_samp |
uint16_t | bitSamp |
uint16_t | block_align |
uint16_t | blockAlign |
uint32_t | byte_rate |
uint32_t | byteRate |
uint16_t | channels |
uint8_t | data_flag[4] |
uint8_t | dataFlag[4] |
uint8_t | fmt[4] |
uint32_t | fmt_len |
uint32_t | fmtLen |
uint32_t | length |
uint8_t | riff[4] |
uint32_t | samp_freq |
uint32_t | sampFreq |
uint32_t | size |
uint16_t | tag |
uint8_t | wave_flag[4] |
uint8_t | waveFlag[4] |

struct wave_file_t

Data Fields
uint32_t * | data |
wave_header_t | header |
uint32_t * | pData |

## Macro Definition Documentation

#define WAV_PARTIAL_BUFFER_SIZE

#define WAV_PI

#define WAVE_FILE_HEADER_SIZE

## Enumeration Type Documentation

enum wav_mods

Enumerator
kNoModulation |
kSquareWave |
kSawWave |
kTriangleWave |

## Function Documentation

snd_status_t get_wav_data | ( | wave_file_t * | waveFile | ) |

float32_t get_wav_Hz | ( | uint16_t * | pcmBuffer,
|  | float32_t * | fftData,
|  | float32_t * | fftResult,
|  | uint32_t | sampleSize
| ) |  |

uint32_t mod_wav_data | ( | uint16_t * | pcmBuffer,
|  | uint16_t * | modBuffer,
|  | float32_t * | fftData,
|  | float32_t * | fftResult,
|  | uint16_t | startIndex,
|  | uint32_t | sampleSize,
|  | uint8_t | modType
| ) |  |

void modulator_init | ( | void |  | ) |

snd_status_t play_mod_wav | ( | uint16_t * | pcmBuffer,
|  | uint16_t * | modPointer,
|  | float32_t * | fftData,
|  | float32_t * | fftResult,
|  | uint8_t | divider,
|  | uint8_t | modulation,
|  | uint32_t | srcSizeBytes,
|  | uint32_t | sampleSize
| ) |  |

snd_status_t play_wav | ( | uint32_t * | pcmBuffer,
|  | uint8_t | divider
| ) |  |

void play_wav_arpeggio | ( | uint32_t * | arpeggioBuffer,
|  | uint32_t | introLength,
|  | uint8_t | divider
| ) |  |

static void send_wav | ( | uint8_t * | dataBuffer,
|  | uint32_t | length,
|  | sai_data_format_t * | dataFormat
| ) |  |
| static