Remove dependency on libsndfile

Wav files include the length of the data in the file header. libsndfile
expects this length to be there and be sane. Unfortunately, when piping
data from avconv, this length is dummied out because the full length is
not known yet, so libsndfile can't be used to process a pipe data
stream. This removes the libsndfile dependency and replaces the used
functions with hand written ones.
This commit is contained in:
Brandon Skari
2017-05-15 14:36:02 -06:00
parent 8f25432e4f
commit b85ece8df6
2 changed files with 125 additions and 66 deletions

View File

@@ -62,7 +62,7 @@ def broadcast_fm(media_file_name, frequency):
for line in lines:
logger.debug(line)
#thread = threading.Thread(target=log_stdout).start()
thread = threading.Thread(target=log_stdout).start()
logger.debug('Calling broadcast_fm')
_rpitx.broadcast_fm(stream_process.stdout.fileno(), frequency)