A DSP-based decompressor unit for high-fidelity MPEG-Audio over TCP/IP networks

Copyright 1997 by Björn Wesén at Axis Communications AB, Sweden 

[ Home | Contents | Component and tool archive


Previous chapter: Appendix C, next chapter: Appendix E

Appendix D - The main C sourcecode

The program was written with some object-orientation in mind, which means that all functions that operate on a certain structure, has the structure's name as prefix in the function name, for example "Bitstream_get" which gets bits from a bitstream structure.

There is a sea of conditional compile directives in the source, because of its multi-platform compiling. It was designed to be compileable on both Linux, Windows and the DSP of course. As a result, it can be quite difficult to browse some parts of the code without looking closer. The code was optimized for realtime playback on a DSP, not for readability or expandability.

The following files constitute the main C sourcecode. The tablefiles for the transforms are omitted - they can be autogenerated from within the main program using a #define statement. Please note that these files are presented as-is for reference only, they don't contain a Makefile and might contain errors. Also note that they cannot run on the DSP in realtime without hand-made assembler optimizing. The assembler version is not presented in the thesis because it is copyrighted. If you are just looking for the source-code to an mp3 player, I suggest taking a look at some of the other freely available players with source, like amp; see the link below.

Previous chapter: Appendix C, next chapter: Appendix E


This document may be freely distributed for educational purposes. See the copyright notice for additional information.