Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 20320
Collapse All | Expand All

(-)fceu/drivers/common/unixdsp.c (-2 / +8 lines)
Lines 48-54 int InitUNIXDSPSound(int *rate, int bits Link Here
48
  x=0;
48
  x=0;
49
  do
49
  do
50
  {
50
  {
51
   sprintf(buf,"/dev/dsp%d",x);
51
   if (x == 0)
52
    strncpy(buf,"/dev/dsp", sizeof buf);
53
   else
54
    snprintf(buf, sizeof buf, "/dev/dsp%d", x);
52
   printf("  Trying %s...",buf);
55
   printf("  Trying %s...",buf);
53
   dspfd=open(buf,O_WRONLY|O_NONBLOCK);
56
   dspfd=open(buf,O_WRONLY|O_NONBLOCK);
54
   if(dspfd!=-1) break;
57
   if(dspfd!=-1) break;
Lines 59-65 int InitUNIXDSPSound(int *rate, int bits Link Here
59
 }
62
 }
60
 else
63
 else
61
 {
64
 {
62
  sprintf(buf,"/dev/dsp%d",dev);
65
  if (dev == 0)
66
   strncpy(buf,"/dev/dsp", sizeof buf);
67
  else
68
   snprintf(buf, sizeof buf, "/dev/dsp%d", dev);
63
  printf("  Opening %s...",buf);
69
  printf("  Opening %s...",buf);
64
  dspfd=open(buf,O_WRONLY);
70
  dspfd=open(buf,O_WRONLY);
65
  if(dspfd==-1) goto __disperror;
71
  if(dspfd==-1) goto __disperror;

Return to bug 20320