Home | History | Annotate | Download | only in test

Lines Matching refs:dsp

46             dsp = ossaudiodev.open('w')
54 dsp.bufsize()
55 dsp.obufcount()
56 dsp.obuffree()
57 dsp.getptr()
58 dsp.fileno()
61 self.assertFalse(dsp.closed)
62 self.assertEqual(dsp.name, "/dev/dsp")
63 self.assertEqual(dsp.mode, "w", "bad dsp.mode: %r" % dsp.mode)
68 setattr(dsp, attr, 42)
72 self.fail("dsp.%s not read-only" % attr)
78 dsp.setparameters(AFMT_S16_NE, nchannels, rate)
81 dsp.write(data)
82 dsp.close()
91 def set_parameters(self, dsp):
103 if (dsp.setfmt(fmt) == fmt and
104 dsp.channels(channels) == channels and
105 dsp.speed(rate) == rate):
113 result = dsp.setparameters(fmt, channels, rate, False)
117 result = dsp.setparameters(fmt, channels, rate, True)
121 def set_bad_parameters(self, dsp):
135 result = dsp.setparameters(fmt, channels, rate, False)
140 result = dsp.setparameters(fmt, channels, rate, True)
151 dsp = ossaudiodev.open("w")
153 self.set_parameters(dsp)
157 #self.set_bad_parameters(dsp)
159 dsp.close()
160 self.assertTrue(dsp.closed)
169 with ossaudiodev.open('w') as dsp:
171 self.assertTrue(dsp.closed)
174 dsp = ossaudiodev.open('w')
175 dsp.close()
176 self.assertRaises(ValueError, dsp.fileno)
177 self.assertRaises(ValueError, dsp.read, 1)
178 self.assertRaises(ValueError, dsp.write, b'x')
179 self.assertRaises(ValueError, dsp.writeall, b'x')
180 self.assertRaises(ValueError, dsp.bufsize)
181 self.assertRaises(ValueError, dsp.obufcount)
182 self.assertRaises(ValueError, dsp.obufcount)
183 self.assertRaises(ValueError, dsp.obuffree)
184 self.assertRaises(ValueError, dsp.getptr)
192 dsp = ossaudiodev.open('w')
198 dsp.close()