GithubHelp home page GithubHelp logo

spdif-tools's Introduction

S/PDIF tools

These simple programs convert raw AC3 (Dolby Digital, A/52) and DTS streams into WAV files containing the S/PDIF fake PCM encoding thereof. This means that if such a .wav file is replayed correctly bit-by-bit via the S/PDIF output of a device and supplied to a standards compliant decoder, it will be recognized as a standards compliant AC3/DTS stream, indistinguishable from a stream generated e.g. by a DVD player.

This is useful to e.g. author CDs containing compressed multichannel data (such as DTS encoded CDs that commercially available). Take care: Playing back the files produced via speakers at high volume may damage these or your hearing.

A note about coding style

These sources are very old (from around 2006/2007) and show my coding abilities back then when I started with C. I hope to clean this up and modernize it at some point in the future.

ac32spdif

This tool takes a raw .ac3 file and converts it into a .wav file of the same sample rate containing one AC3 frame plus padding zeros for the remaining time of that frame's time slot.

dts2spdif

In a similar fashion, this tool translates a .dts file to a .wav file. Currently it only supports 16 bit encapsulation, i.e. the data stream is included in the .wav file 1:1. The DTS specification also defines a 14 bit format for use with CDs where there is a possibility that the data will be played back via speakers in order to reduce the possibility of speaker/hearing damage when the medium is played back without a DTS decoder. In this case, only the lower 14 bits of a word would be used, with the high 2 bits set to zero. This encoding may be added to dts2spdif later on.

License

As usual, this code comes with no warranty whatsoever. I am especially not responsible if you blow up your speakers or ears using these tools.

Do whatever you like with this code, but if you use it for your own application I would appreciate an attribution note in the documentation. Thanks!

-- norly

spdif-tools's People

Contributors

norly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.