···364364each frame.
365365366366The main sound module interfaces with the system-specific code through
367367-one structure, pcm, and a few functions: pcm_init, pcm_close, and
368368-pcm_submit. While the first two should be obvious, pcm_submit needs
367367+one structure, pcm, and a few functions: rockboy_pcm_init, rockboy_pcm_close, and
368368+rockboy_pcm_submit. While the first two should be obvious, rockboy_pcm_submit needs
369369some explaining. Whenever realtime sound output is operational,
370370-pcm_submit is responsible for timing, and should not return until it
370370+rockboy_pcm_submit is responsible for timing, and should not return until it
371371has successfully processed all the data in its input buffer (pcm.buf).
372372On *nix sound devices, this typically means just waiting for the write
373373syscall to return, but on systems such as DOS where low level IO must
374374-be handled in the program, pcm_submit needs to delay until the current
374374+be handled in the program, rockboy_pcm_submit needs to delay until the current
375375position in the DMA buffer has advanced sufficiently to make space for
376376the new samples, then copy them.
377377378378For special sound output implementations like write-to-file or the
379379-dummy sound device, pcm_submit should write the data immediately and
379379+dummy sound device, rockboy_pcm_submit should write the data immediately and
380380return 0, indicating to the caller that other methods must be used for
381381timing. On real sound devices that are presently functional,
382382-pcm_submit should return 1, regardless of whether it buffered or
382382+rockboy_pcm_submit should return 1, regardless of whether it buffered or
383383actually wrote the sound data.
384384385385And yes, for unices without OSS, we hope to add piped audio output