Mercurial > hg > xemacs-beta
comparison src/linuxplay.c @ 233:52952cbfc5b5 r20-5b15
Import from CVS: tag r20-5b15
| author | cvs |
|---|---|
| date | Mon, 13 Aug 2007 10:14:14 +0200 |
| parents | 41ff10fd062f |
| children | c5d627a313b1 |
comparison
equal
deleted
inserted
replaced
| 232:aa6545ea0638 | 233:52952cbfc5b5 |
|---|---|
| 960 unsigned char *pptr,*optr,*cptr,*sptr; | 960 unsigned char *pptr,*optr,*cptr,*sptr; |
| 961 int wrtn,rrtn,crtn,prtn; | 961 int wrtn,rrtn,crtn,prtn; |
| 962 | 962 |
| 963 /* We need to read at least the header information before we can start | 963 /* We need to read at least the header information before we can start |
| 964 doing anything */ | 964 doing anything */ |
| 965 if (!data || length < HEADERSZ) | 965 if (!data || length < HEADERSZ) { |
| 966 if (fd < 0) return; | 966 if (fd < 0) return; |
| 967 else { | 967 else { |
| 968 length = read(fd,linuxplay_sndbuf,SNDBUFSZ); | 968 length = read(fd,linuxplay_sndbuf,SNDBUFSZ); |
| 969 if (length < HEADERSZ) | 969 if (length < HEADERSZ) |
| 970 return; | 970 return; |
| 971 data = linuxplay_sndbuf; | 971 data = linuxplay_sndbuf; |
| 972 length = SNDBUFSZ; } | 972 length = SNDBUFSZ; } |
| 973 } | |
| 973 | 974 |
| 974 ffmt = analyze_format(data,&fmt,&speed,&tracks,&parsesndfile); | 975 ffmt = analyze_format(data,&fmt,&speed,&tracks,&parsesndfile); |
| 975 | 976 |
| 976 if (ffmt != fmtRaw && ffmt != fmtSunAudio && ffmt != fmtWave) { | 977 if (ffmt != fmtRaw && ffmt != fmtSunAudio && ffmt != fmtWave) { |
| 977 warn("Unsupported file format (neither RAW, nor Sun/DECAudio, nor WAVE)"); | 978 warn("Unsupported file format (neither RAW, nor Sun/DECAudio, nor WAVE)"); |
