#13 AudioDeviceName was cut short

closed-fixed
nobody
None
5
2011-07-13
2011-06-02
Anonymous
No

Hi,

When I use WinLIRC 0.8.7a in Win7 with audio receiver, if I choose any audio device with long name, I always get an error message that said "WinLIRC failed to initialize."

From the audio receiver plug-in setup screen, it seems that the length all audio device names were limited to 30 chars. If I choose an audio device with a name longer than 30 chars, I'll get the error message, and when I use notepad to open WinLIRC.ini later, it shows something like below:

AudioDeviceName=Front Mic (VIA High Definition

Actually the correct name is "Front Mic (VIA High Definition Audio)", which is more than 30 chars. If I manually edit this line as below, then WinLIRC works fine.
AudioDeviceName=Front Mic (VIA High Definition Audio)

Discussion

  •  
    Attachments
  • Ian
    Ian
    2011-06-03

    Hi,
    the problem is
    http://msdn.microsoft.com/en-us/library/aa910191.aspx
    CHAR szPname[MAXPNAMELEN];
    MAXPNAMELEN is 32. That includes a null terminator so 31 usable characters. You are only see 30 chars tho, so it's very possible 1 has gone missing somewhere causing the problem. I'll try look into this. It might be the space has disappeared from the end.

     
  • Ian
    Ian
    2011-07-13

    • status: open --> closed-fixed
     
  • Ian
    Ian
    2011-07-13

    Fixed, will release shortly with new version.