summaryrefslogtreecommitdiff
path: root/modules/sound/tests/unit_tests/wavread.dia.ref
blob: edb088dfc34d87bfee5953964318780c5e5f790c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// =============================================================================
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) ????-2008 - INRIA
//
//  This file is distributed under the same license as the Scilab package.
// =============================================================================
  a = wavread('SCI/modules/sound/demos/chimes.wav','size');
	if size(a) <> [ 1 2] then bugmes();quit;end
  if a <> [ 2 13921] then bugmes();quit;end
  [y,Fs,bits]=wavread('SCI/modules/sound/demos/chimes.wav');
  if Fs <> 22050 then bugmes();quit;end
  if bits <> 16 then bugmes();quit;end
  if size(y) <> [ 2 13921] then bugmes();quit;end
  //subplot(2,1,1)
  //plot2d(y(:,1))
  //subplot(2,1,2)
  //plot2d(y(:,2))
  //xdel(winsid());
  y=wavread('SCI/modules/sound/demos/chimes.wav',[1 5]) //the first five samples
 y  =
 
    0.0000610    0.0002747    0.0002136    0.0001526    0.0000916  
    0.0000916    0.0001831    0.0000610    0.           0.0000916  
  if size(y) <> [2 5] then bugmes();quit;end