Mercurial > pygar
diff modules/bluespec/Pygar/core/AudioPipeTypes.bsv @ 13:6d461680c6d9 pygar svn.14
[svn r14] more stuff
author | punk |
---|---|
date | Tue, 27 Apr 2010 09:03:28 -0400 |
parents | |
children | 49049f97312c |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/modules/bluespec/Pygar/core/AudioPipeTypes.bsv Tue Apr 27 09:03:28 2010 -0400 1.3 @@ -0,0 +1,50 @@ 1.4 + 1.5 +// The MIT License 1.6 + 1.7 +// Copyright (c) 2009 Massachusetts Institute of Technology 1.8 + 1.9 +// Permission is hereby granted, free of charge, to any person obtaining a copy 1.10 +// of this software and associated documentation files (the "Software"), to deal 1.11 +// in the Software without restriction, including without limitation the rights 1.12 +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 1.13 +// copies of the Software, and to permit persons to whom the Software is 1.14 +// furnished to do so, subject to the following conditions: 1.15 + 1.16 +// The above copyright notice and this permission notice shall be included in 1.17 +// all copies or substantial portions of the Software. 1.18 + 1.19 +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1.20 +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1.21 +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1.22 +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1.23 +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1.24 +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 1.25 +// THE SOFTWARE. 1.26 + 1.27 +// Author: Ker 1.28 +// min Fleming kfleming@mit.edu 1.29 + 1.30 +import Connectable::*; 1.31 +import GetPut::*; 1.32 +import ClientServer::*; 1.33 + 1.34 +typedef Int#(16) Sample; 1.35 + 1.36 +typedef enum { 1.37 + EndOfFile = 0, 1.38 + Data = 1 1.39 +} AudioProcessorControl deriving (Bits,Eq); 1.40 + 1.41 + 1.42 +typedef struct { 1.43 + Sample left; 1.44 + Sample right; 1.45 +} StereoSample deriving (Bits,Eq); 1.46 + 1.47 +typedef union tagged{ 1.48 + Sample Sample; 1.49 + void EndOfFile; 1.50 +} AudioProcessorUnit deriving (Bits,Eq); 1.51 + 1.52 + 1.53 +