Interfacing Real-Time Audio and File I/O
Abstract
Programming a computer to record or play a sound file in real-time is not as easy as it may seem. The naive approach is to call file I/O APIs from within the routine that handles real-time audio I/O. This leads to audible glitches whenever the time taken to access a file exceeds the time available to deliver a buffer of real-time audio.
This paper describes an approach to streaming file playback and recording that operates correctly under these conditions. It performs file I/O in a separate thread, buffers audio data to mask file I/O delays, and uses asynchronous message passing and lock-free queues for inter-thread communication.
How to cite
Ross Bencina. 2014. “Interfacing Real-Time Audio and File I/O.” In Harmony: Proceedings of the Australasian Computer Music Conference 2014, edited by Timothy Opie, 21–28. Melbourne, Victorian College of the Arts / Melbourne Conservatorium of Music: Australasian Computer Music Association. https://computermusic.org.au/proceedings/ACMC2014-proceedings/bencina-interfacing-real-time.html
BibTeX
@inproceedings{bencina2014interfacing,
author = {Ross Bencina},
title = {{Interfacing Real-Time Audio and File I/O}},
booktitle = {Harmony: Proceedings of the Australasian Computer Music Conference 2014},
editor = {Timothy Opie},
pages = {21--28},
year = {2014},
publisher = {Australasian Computer Music Association},
address = {Melbourne, Victorian College of the Arts / Melbourne Conservatorium of Music},
issn = {1448-7780},
url = {https://computermusic.org.au/proceedings/ACMC2014-proceedings/bencina-interfacing-real-time.pdf}
}