C4EV3
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Data Structures | Macros | Functions
ev3_sound.h File Reference

Functions and constants for controlling EV3 sounds. More...

#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <signal.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <stdbool.h>
#include <limits.h>
#include <errno.h>
#include "ev3_wait.h"
#include "../include/ev3_constants.h"

Go to the source code of this file.

Data Structures

struct  Tone
 

Macros

#define ev3_sound_h
 

Functions

void PlayFileEx (char *pFileName, uint8_t volume, bool loop)
 
void PlayToneEx (unsigned short frequency, unsigned short duration, uint8_t volume)
 
void PlaySoundEx (uint8_t aCode, uint8_t volume)
 
void PlayTones (Tone tones[], size_t size)
 
int SoundState ()
 
void StopSound ()
 
bool SoundTest ()
 
void SoundReady ()
 
void MuteSound ()
 
void UnmuteSound ()
 
void ClearSound ()
 

Detailed Description

Functions and constants for controlling EV3 sounds.

ev3_sound.h contains declarations for the EV3 C API sound functions.

License:

The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.

The Initial Developer of this code is John Hansen. Portions created by John Hansen are Copyright (C) 2009-2013 John Hansen. All Rights Reserved.


Author
John Hansen (bricxcc_at_comcast.net)
Date
2013-06-20
Version
1

Macro Definition Documentation

#define ev3_sound_h

Function Documentation

void ClearSound ( )
void MuteSound ( )
void PlayFileEx ( char *  pFileName,
uint8_t  volume,
bool  loop 
)
void PlaySoundEx ( uint8_t  aCode,
uint8_t  volume 
)
void PlayToneEx ( unsigned short  frequency,
unsigned short  duration,
uint8_t  volume 
)
void PlayTones ( Tone  tones[],
size_t  size 
)

Play multiple tones. Play a series of tones contained in the tones array. Each element in the array is an instance of the Tone structure, containing a frequency and a duration.

Parameters
tonesThe array of tones to play.
sizeThe number of tones to play.
void SoundReady ( )
int SoundState ( )
bool SoundTest ( )
void StopSound ( )
void UnmuteSound ( )