Skip to content

Commit

Permalink
Removed the mention of wav in the function signature since logically …
Browse files Browse the repository at this point in the history
…it is not required
  • Loading branch information
kmp1 committed Feb 15, 2015
1 parent eaa33a4 commit 0242fe6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

[![Build Status](https://travis-ci.org/kmp1/tzx.js.svg)](https://travis-ci.org/kmp1/tzx.js)

A javascript .tzx (and .tap) data file API (for converting ZX Spectrum games to wav files)
A javascript .tzx (and .tap) data file API (for converting ZX Spectrum games to audio files)

Some further information is available [here](http://kmp1.github.io/tzx.js/).
4 changes: 2 additions & 2 deletions src/tzx
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ var inputConvert = {

var details;
if (isTzx) {
details = tzx_js.convertTzxToWave(tzx_js.MachineSettings.ZXSpectrum48, inputConvert, wave);
details = tzx_js.convertTzxToAudio(tzx_js.MachineSettings.ZXSpectrum48, inputConvert, wave);
} else {
details = tzx_js.convertTapToWave(tzx_js.MachineSettings.ZXSpectrum48, inputConvert, wave);
details = tzx_js.convertTapToAudio(tzx_js.MachineSettings.ZXSpectrum48, inputConvert, wave);
}

fs.writeFileSync(output, new Buffer(wave.toByteArray()));
Expand Down
16 changes: 8 additions & 8 deletions src/tzx.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ var tzx_js = (function () {
return dataStart + blockDetails.blockLength;
}

function convertTzxToWave(machineSettings, input, output) {
function convertTzxToAudio(machineSettings, input, output) {
var i = 0, version = { major: -1, minor: -1}, blockDetails, retBlockDetails = [];

while (i < input.length) {
Expand Down Expand Up @@ -325,7 +325,7 @@ var tzx_js = (function () {
return dataStart + blockDetails.blockLength;
}

function convertTapToWave(machineSettings, input, output) {
function convertTapToAudio(machineSettings, input, output) {
var i = 0, blockDetails, retBlockDetails = [];

while (i < input.length) {
Expand All @@ -349,7 +349,7 @@ var tzx_js = (function () {
return {

/**
* Converts a TZX to a wave file and returns some details about
* Converts a TZX to an audio file and returns some details about
* what it has read.
*
* @param {Number} machineSettings The machine specific settings to use
Expand All @@ -361,10 +361,10 @@ var tzx_js = (function () {
* example).
* @return {Object} details about the TZX file that was converted
*/
convertTzxToWave: convertTzxToWave,
convertTzxToAudio: convertTzxToAudio,

/**
* Converts a TZX to a wave file and returns some details about
* Converts a TZX to an audio file and returns some details about
* what it has read.
*
* @param {Number} machineSettings The machine specific settings to use
Expand All @@ -376,7 +376,7 @@ var tzx_js = (function () {
* example).
* @return {Object} details about the TAP file that was converted
*/
convertTapToWave: convertTapToWave,
convertTapToAudio: convertTapToAudio,

MachineSettings: {
ZXSpectrum48: {
Expand Down Expand Up @@ -412,7 +412,7 @@ var tzx_js = (function () {
}());

if (typeof exports !== "undefined") {
exports.convertTzxToWave = tzx_js.convertTzxToWave;
exports.convertTapToWave = tzx_js.convertTapToWave;
exports.convertTzxToAudio = tzx_js.convertTzxToAudio;
exports.convertTapToAudio = tzx_js.convertTapToAudio;
exports.MachineSettings = tzx_js.MachineSettings;
}
4 changes: 2 additions & 2 deletions test/main_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ exports.testTzxWithOnlyBlock10Data = function(test) {
// passing in the type of computer to generate the wave file for
// An object that gives access to the TZX file and the output
// file
var details = tzx_js.convertTzxToWave(tzx_js.MachineSettings.ZXSpectrum48, {
var details = tzx_js.convertTzxToAudio(tzx_js.MachineSettings.ZXSpectrum48, {
length: tzxFile.length,
getByte: function(index) {
return tzxFile[index];
Expand All @@ -50,7 +50,7 @@ exports.testBasicTap = function(test) {

var wave = wav_js.create(1, 44100, wav_js.BitSize.EIGHT);

var details = tzx_js.convertTapToWave(tzx_js.MachineSettings.ZXSpectrum48, {
var details = tzx_js.convertTapToAudio(tzx_js.MachineSettings.ZXSpectrum48, {
length: tapFile.length,
getByte: function(index) {
return tapFile[index];
Expand Down

0 comments on commit 0242fe6

Please sign in to comment.