| 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
Functions | Variables
modulator.c File Reference
`#include <string.h>`
`#include <math.h>`
`#include <stdbool.h>`
`#include <stdlib.h>`
`#include <stdio.h>`
`#include "fsl_soundcard.h"`
`#include "fsl_sai_driver.h"`
`#include "fsl_sai_features.h"`
`#include "fsl_sgtl5000_driver.h"`
`#include "modulator.h"`
`#include "terminal_menu.h"`
`#include "arm_math.h"`

## 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 length, uint8_t divider)

## Variables
sound_card_t | g_soundCard
static sai_data_format_t * | format
static sai_user_config_t | tx_config
bool | firstCopy

## 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 | length,
|  | uint8_t | divider
| ) |  |

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

## Variable Documentation

bool firstCopy

sai_data_format_t* format
| static

sound_card_t g_soundCard

sai_user_config_t tx_config
| static