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

Support for DSF Files. #283

Merged
merged 4 commits into from Jan 11, 2017
Merged

Support for DSF Files. #283

merged 4 commits into from Jan 11, 2017

Conversation

@docbobo
Copy link
Contributor

docbobo commented Jan 7, 2017

This PR address support for DSF files as discussed in #155. Implementation is based on information available from Sony's DSF File Format Specification.

Since this is my first stab as Python, there might be a few rough edges. Please feel free to point them out and I will happily improve them.

@docbobo docbobo force-pushed the docbobo:feature/dsf-support branch 3 times, most recently from 0cf723c to bc17bc4 Jan 7, 2017
Copy link
Member

lazka left a comment

Thanks

pass


class DSFHeaderError(error):

This comment has been minimized.

Copy link
@lazka

lazka Jan 9, 2017

Member

Is there a need for a separate exception type? I'd prefer if just error is used.

This comment has been minimized.

Copy link
@docbobo

docbobo Jan 9, 2017

Author Contributor

This was inspired by what I found in flac.py. I believe you are asking whether there is value in differentiating between general exceptions and header exceptions - which there probably isn't. Will rework.

self.total_size, self.offset_metdata_chunk)


class FormatChunk(DSFChunk, StreamInfo):

This comment has been minimized.

Copy link
@lazka

lazka Jan 9, 2017

Member

Please create a separate StreamInfo class (maybe taking the FormatChunk in init). This way the DSFChunk/FormatChunk API isn't exposed to the user.

This comment has been minimized.

Copy link
@docbobo

docbobo Jan 9, 2017

Author Contributor

Will have look.

dsd_header.write()

finally:
fileobj.close()

This comment has been minimized.

Copy link
@lazka

lazka Jan 9, 2017

Member

Don't close fileobj. That's handled by loadfile() if a filename is passed.

This comment has been minimized.

Copy link
@docbobo

docbobo Jan 9, 2017

Author Contributor

Sure thing.

According to Sony’s DSF File Format Specification (http://dsd-guide.com/sites/default/files/white-papers/DSFFileFormatSpec_E.pdf)
@docbobo docbobo force-pushed the docbobo:feature/dsf-support branch from 500a3b0 to a7057ca Jan 9, 2017
@docbobo

This comment has been minimized.

Copy link
Contributor Author

docbobo commented Jan 9, 2017

Apologies for the rebase, but I had to change the author info - was configured improperly.

@docbobo docbobo mentioned this pull request Jan 9, 2017
@docbobo

This comment has been minimized.

Copy link
Contributor Author

docbobo commented Jan 10, 2017

I believe I've incorporated all your suggestions. Let me know if there's anything else.

@docbobo docbobo force-pushed the docbobo:feature/dsf-support branch from 918a4dc to fe02674 Jan 10, 2017
@lazka
lazka approved these changes Jan 11, 2017
@lazka lazka merged commit 6d02454 into quodlibet:master Jan 11, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@lazka

This comment has been minimized.

Copy link
Member

lazka commented Jan 11, 2017

Thanks.

@audiomuze

This comment has been minimized.

Copy link

audiomuze commented Mar 4, 2017

Does this mean Mutagen now supports tagging of DSF files?

@lazka

This comment has been minimized.

Copy link
Member

lazka commented Mar 4, 2017

@audiomuze yes, since 1.37.

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.