audio recording

Pierre A. Humblet pierre.humblet@ieee.org
Tue Nov 23 04:48:00 GMT 2004


On Tue, Nov 23, 2004 at 10:47:07AM +0900, Shuhei Habu wrote:
> Hi Pierre-san,
> 
> > Weird. open("/dev/dsp", ) should never produce that
> > error. Please strace your simple open program
> > or "cat /dev/dsp ".
> 
> Thank you.
> You are right that open() never output Permission denied.
> Frankly, but I don't know why open() with O_RD* always returns -1...
> 
> In case of "cat /dev/dsp",
> 
>    54   31847 [main] cat 3956 open: open (/dev/dsp, 0x10000)
>    50   31897 [main] cat 3956 normalize_posix_path: src /dev/dsp
>    46   31943 [main] cat 3956 normalize_posix_path: /dev/dsp = normalize_posix_path (/dev/dsp)
>    47   31990 [main] cat 3956 mount_info::conv_to_win32_path: conv_to_win32_path (/dev/dsp)
>    48   32038 [main] cat 3956 mount_info::conv_to_win32_path: src_path /dev/dsp, dst \dev\dsp, flags 0x2, rc 0
>    59   32097 [main] cat 3956 build_fh_pc: fh 0x616E1BE4
>    50   32147 [main] cat 3956 open: -1 = open (/dev/dsp, 0x10000)
>    75   32222 [main] cat 3956 writev: writev (2, 0x22D2B8, 1)
>    55   32277 [main] cat 3956 fhandler_base::write: binary write
> cat:    51   32328 [main] cat 3956 fhandler_base::write: 5 = write (0x22D348, 5)
>    57   32385 [main] cat 3956 writev: 5 = write (2, 0x22D2B8, 1), errno 13
>    53   32438 [main] cat 3956 writev: writev (2, 0x22D2A8, 1)
>    47   32485 [main] cat 3956 fhandler_base::write: binary write
> /dev/dsp   49   32534 [main] cat 3956 fhandler_base::write: 8 = write (0x22D338, 8)
>    46   32580 [main] cat 3956 writev: 8 = write (2, 0x22D2A8, 1), errno 13
>    57   32637 [main] cat 3956 writev: writev (2, 0x22D268, 1)
>    48   32685 [main] cat 3956 fhandler_base::write: binary write
> : Permission denied   73   32758 [main] cat 3956 fhandler_base::write: 19 = write (0x22D2F8, 19)
>    47   32805 [main] cat 3956 writev: 19 = write (2, 0x22D268, 1), errno 13
>    57   32862 [main] cat 3956 writev: writev (2, 0x22EE78, 1)
>    48   32910 [main] cat 3956 fhandler_base::write: binary write
> 
>    48   32958 [main] cat 3956 fhandler_base::write: 1 = write (0x611153BF, 1)
>    47   33005 [main] cat 3956 writev: 1 = write (2, 0x22EE78, 1), errno 13
>    52   33057 [main] cat 3956 do_exit: do_exit (1), exit_state 0

Looks like /dev/dsp is not recognized as a device.
Are you sure you are using a recent version of Cygwin?
What does "uname -a" report?

Pierre

P.S.: This is what I get:
  189  109745 [main] cat 442389 open: open (/dev/dsp, 0x10000)
  448  110193 [main] cat 442389 normalize_posix_path: src /dev/dsp
  384  110577 [main] cat 442389 normalize_posix_path: /dev/dsp = normalize_posix_path (/dev/dsp)
  180  110757 [main] cat 442389 mount_info::conv_to_win32_path: conv_to_win32_path (/dev/dsp)
  348  111105 [main] cat 442389 mount_info::conv_to_win32_path: src_path /dev/dsp, dst \dev\dsp, 
flags 0x2, rc 0
  196  111301 [main] cat 442389 fhandler_dev_dsp::fhandler_dev_dsp: 0x61794AC4
  349  111650 [main] cat 442389 build_fh_pc: fh 0x61794AC4
  176  111826 [main] cat 442389 fhandler_base::set_flags: flags 0x10000, supplied_bin 0x0
  331  112157 [main] cat 442389 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
  174  112331 [main] cat 442389 fhandler_base::set_flags: filemode set to binary
 3107  115438 [main] cat 442389 fhandler_dev_dsp::open: ACCMODE=0x00000000 audio_in=3 audio_out=0, 
err=0
  214  115652 [main] cat 442389 open: 3 = open (/dev/dsp, 0x10000)


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list