Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress device name output from libdiscid in Windows #33

Closed
JonnyJD opened this issue Dec 11, 2012 · 8 comments

Comments

@JonnyJD
Copy link
Owner

commented Dec 11, 2012

The Windows code for libdiscid has:

 strcpy(filename, "\\\\.\\");
        len = strlen(device);
        if (colon = strchr(device, ':')) {
                len = colon - device + 1;
        }
        strncat(filename, device, len > 120 ? 120 : len);
        printf("%s\n", device);
        printf("%s\n", filename);

Which on our end leads to this output:

D:
\\.\D:

after using mediatools.

There is no output like this on other platforms.

Since we don't print these lines, we can't just "not print" these. We can try to disable stdout just before we use libdiscid: http://stackoverflow.com/questions/4178614/suppressing-output-of-module-calling-outside-library

@jesus2099

This comment has been minimized.

Copy link
Contributor

commented Dec 11, 2012

Wow, so cool !

@Freso

This comment has been minimized.

Copy link
Collaborator

commented Dec 11, 2012

This should probably be fixed upstream though, instead of making a (relatively) lengthy work-around.

I do like the and not debug though. 👍

@JonnyJD

This comment has been minimized.

Copy link
Owner Author

commented Dec 11, 2012

I created an upstream report:
http://tickets.musicbrainz.org/browse/LIB-20

I doubt this will be fixed soon, though.

@JonnyJD

This comment has been minimized.

Copy link
Owner Author

commented Jan 10, 2013

Fixed upstream with metabrainz/libdiscid@15b4ba7

Actually this was already fixed 5 years ago, but this was only in the isrc branch.
The fix is now life with libdiscid 0.3.0

I can probably remove the hack when we have a working windows build of libdiscid 0.3.0.
http://ftp.musicbrainz.org/pub/musicbrainz/libdiscid/libdiscid-0.3.0-win32bin.zip needs MSVCR100 and I don't want to include that in my windows package.

@jesus2099

This comment has been minimized.

Copy link
Contributor

commented Jan 11, 2013

You’re right, the less files, the better. :)

@JonnyJD

This comment has been minimized.

Copy link
Owner Author

commented Jan 15, 2013

Could you try http://isrcsubmit.jonnyjd.net/downloads/libdiscid-0.3.0-win32.zip? That shouldn't depend on anything that's not part of the system.

If that works, I can link that everywhere and remove that weird fix again.

@jesus2099

This comment has been minimized.

Copy link
Contributor

commented Jan 15, 2013

It worked with mediatools backend. :)
I will test your new release then, because I have a global name 'saneWhich' is not defined error when I try to use cdrdao. I think my version might be a mix of various file tries and be happy to install a new clean version. :)

@JonnyJD

This comment has been minimized.

Copy link
Owner Author

commented Jan 26, 2013

0.5.2 is this "new clean version".

0.6 is still not done.
Potentially 0.6 will be named 1.0 and I will work on 2.0 aftewards (with NGS).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.