# along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA import sys import audiotools import test_streams import cPickle if __name__ == "__main__": write_offset = audiotools.config.getint_default("System", "cdrom_write_offset", 0) sine = audiotools.BufferedPCMReader( audiotools.PCMReaderWindow( test_streams.Sine16_Stereo(12397980 + 10862124, 44100, 441.0, 0.50, 4410.0, 0.49, 1.0), write_offset, 12397980 + 10862124, ) ) f = open(sys.argv[5], "wb") cPickle.dump( audiotools.pcm_frame_cmp(audiotools.LimitedPCMReader(sine, 12397980), audiotools.open(sys.argv[8]).to_pcm()), f ) cPickle.dump( audiotools.pcm_frame_cmp(audiotools.LimitedPCMReader(sine, 10862124), audiotools.open(sys.argv[9]).to_pcm()), f ) f.close()
import sys import audiotools import test_streams import re import cPickle if (__name__ == "__main__"): print repr(sys.argv) write_offset = audiotools.config.getint_default("System", "cdrom_write_offset", 0) sine = audiotools.PCMReaderWindow( test_streams.Sine16_Stereo(12397980 + 10862124, 44100, 441.0, 0.50, 4410.0, 0.49, 1.0), write_offset, 12397980 + 10862124) for line in open(sys.argv[6]).readlines(): match = re.search(r'AUDIOFILE "(.+?)"', line) if (match is not None): f = open(sys.argv[3], "wb") cPickle.dump( audiotools.pcm_frame_cmp( sine, audiotools.open(match.group(1)).to_pcm()), f) f.close() sys.exit(0) else: sys.exit(1)
# You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA import sys import audiotools import test_streams import cPickle if (__name__ == "__main__"): write_offset = audiotools.config.getint_default("System", "cdrom_write_offset", 0) sine = audiotools.BufferedPCMReader( audiotools.PCMReaderWindow( test_streams.Sine16_Stereo(12397980 + 10862124, 44100, 441.0, 0.50, 4410.0, 0.49, 1.0), write_offset, 12397980 + 10862124)) f = open(sys.argv[5], "wb") cPickle.dump( audiotools.pcm_frame_cmp(audiotools.LimitedPCMReader(sine, 12397980), audiotools.open(sys.argv[8]).to_pcm()), f) cPickle.dump( audiotools.pcm_frame_cmp(audiotools.LimitedPCMReader(sine, 10862124), audiotools.open(sys.argv[9]).to_pcm()), f) f.close()
import test_streams import re import cPickle if (__name__ == "__main__"): print(repr(sys.argv)) write_offset = audiotools.config.getint_default("System", "cdrom_write_offset", 0) sine = audiotools.PCMReaderWindow( test_streams.Sine16_Stereo(12397980 + 10862124, 44100, 441.0, 0.50, 4410.0, 0.49, 1.0), write_offset, 12397980 + 10862124) for line in open(sys.argv[6]).readlines(): match = re.search(r'AUDIOFILE "(.+?)"', line) if (match is not None): f = open(sys.argv[3], "wb") cPickle.dump( audiotools.pcm_frame_cmp( sine, audiotools.open(match.group(1)).to_pcm()), f) f.close() sys.exit(0) else: sys.exit(1)