PropWare
C++ objects and CMake build system for Parallax Propeller
Home
Download
Getting Started
Documentation
Reference
About
Related Links
Namespace List
Class List
File List
Examples
Build System
File List
File Members
propsideworkspace
Learn
Examples
Devices
Audio
Test WAV Volume.c
1
/*
2
Test WAV Volume.c
3
4
Play back a .wav file and try a few different volume settings.
5
6
http://learn.parallax.com/propeller-c-simple-devices/play-wav-files
7
*/
8
9
#include "simpletools.h"
10
#include "wavplayer.h"
11
12
int
main
()
// main function
13
{
14
int
DO = 22, CLK = 23, DI = 24,
CS
= 25;
// SD I/O pins
15
sd_mount(DO, CLK, DI,
CS
);
// Mount SD card
16
17
const
char
techloop[] = {
"techloop.wav"
};
// Set up techloop string
18
wav_play(techloop);
// Pass to wav player
19
20
wav_volume(6);
// Adjust volume
21
pause(3500);
// Play for 3.5 s
22
wav_volume(4);
// Repeat twice more
23
pause(2000);
24
wav_volume(8);
25
pause(3500);
26
27
wav_stop();
// Stop playing
28
}
main
int main(void)
Definition:
GraphicsTest.c:20
CS
const PropWare::Port::Mask CS
Definition:
L3G_Demo.cpp:38
Generated on Sat Aug 27 2016 00:58:03 for PropWare by
1.8.12