punk@13
|
1
|
punk@13
|
2 // The MIT License
|
punk@13
|
3
|
punk@13
|
4 // Copyright (c) 2009 Massachusetts Institute of Technology
|
punk@13
|
5
|
punk@13
|
6 // Permission is hereby granted, free of charge, to any person obtaining a copy
|
punk@13
|
7 // of this software and associated documentation files (the "Software"), to deal
|
punk@13
|
8 // in the Software without restriction, including without limitation the rights
|
punk@13
|
9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
punk@13
|
10 // copies of the Software, and to permit persons to whom the Software is
|
punk@13
|
11 // furnished to do so, subject to the following conditions:
|
punk@13
|
12
|
punk@13
|
13 // The above copyright notice and this permission notice shall be included in
|
punk@13
|
14 // all copies or substantial portions of the Software.
|
punk@13
|
15
|
punk@13
|
16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
punk@13
|
17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
punk@13
|
18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
punk@13
|
19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
punk@13
|
20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
punk@13
|
21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
punk@13
|
22 // THE SOFTWARE.
|
punk@13
|
23
|
punk@13
|
24 // Author: Ker
|
punk@13
|
25 // min Fleming kfleming@mit.edu
|
punk@13
|
26
|
punk@13
|
27 import Connectable::*;
|
punk@13
|
28 import GetPut::*;
|
punk@13
|
29 import ClientServer::*;
|
punk@13
|
30
|
punk@13
|
31 typedef Int#(16) Sample;
|
punk@13
|
32
|
punk@13
|
33 typedef enum {
|
punk@13
|
34 EndOfFile = 0,
|
punk@13
|
35 Data = 1
|
punk@13
|
36 } AudioProcessorControl deriving (Bits,Eq);
|
punk@13
|
37
|
punk@13
|
38
|
punk@13
|
39 typedef struct {
|
punk@13
|
40 Sample left;
|
punk@13
|
41 Sample right;
|
punk@13
|
42 } StereoSample deriving (Bits,Eq);
|
punk@13
|
43
|
punk@13
|
44 typedef union tagged{
|
punk@13
|
45 Sample Sample;
|
punk@13
|
46 void EndOfFile;
|
punk@13
|
47 } AudioProcessorUnit deriving (Bits,Eq);
|
punk@13
|
48
|
punk@13
|
49
|
punk@13
|
50
|