Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
main.c
Go to the documentation of this file.
1/*
2 OutputProbe - tool to investigate external output connections
3
4 Copyright (C)
5 2011, Odin Omdal Hørthe <odin.omdal@gmail.com>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12* *****************************************************************/
13
14
23#include "alsa.h"
24
25#include <unistd.h>
26#include <stdint.h>
27#include <stdio.h>
28
29
30#define SAMPLE_RATE 44100
31
34
35
36int
38 {
39
40 for (int i = 0; i < SAMPLE_RATE; i++)
41 {
42 quiet[i] = 0;
43 noisy[i] = i % 30000;
44 }
45 audio_start (44100, 2);
46
47 for (int i = 0; i < 10; i++)
48 {
50 printf ("=================================\n");
52 printf ("\n");
53 }
54
55 audio_stop ();
56
57 return 0;
58 }
void audio_start(unsigned int rate, unsigned int channel_count)
Definition alsa.c:155
void audio_stop()
Definition alsa.c:163
size_t audio_write(const void *data, size_t amount)
Definition alsa.c:122
Interfacing to ALSA sound output.
#define SAMPLE_RATE
Definition main.c:30
int16_t noisy[SAMPLE_RATE]
Definition main.c:33
int16_t quiet[SAMPLE_RATE]
Definition main.c:32
int main()
Definition main.c:37