summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/formats/cbm_tap.cpp
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2015-12-13 11:23:55 +0100
committer ImJezze <jezze@gmx.net>2015-12-13 11:23:55 +0100
commit4e580a77b9da9b78aba1fec8e44b1de5a4a14aaf (patch)
treedf0e1d28daa79b9151088498a933cd1fc37c9c07 /src/lib/formats/cbm_tap.cpp
parent1cda42b22e591965ee69561fcf52272bd991b3b2 (diff)
parent14d5966a379e9783ba724750a5f84a72af62cadc (diff)
Merge pull request #9 from mamedev/master
Sync to base master
Diffstat (limited to 'src/lib/formats/cbm_tap.cpp')
-rw-r--r--src/lib/formats/cbm_tap.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/formats/cbm_tap.cpp b/src/lib/formats/cbm_tap.cpp
index 23b8a8846ed..1293d3c531d 100644
--- a/src/lib/formats/cbm_tap.cpp
+++ b/src/lib/formats/cbm_tap.cpp
@@ -135,7 +135,7 @@ static int len;
/* This in fact gives the number of samples for half of the pulse */
-INLINE int tap_data_to_samplecount(int data, int frequency)
+static inline int tap_data_to_samplecount(int data, int frequency)
{
// return (int) (0.5 * (0.5 + (((double)CBM_WAV_FREQUENCY / frequency) * (double)data))); // MESS TZX formula
return (int) (0.5 * (((double)CBM_WAV_FREQUENCY / frequency) * (double)((data) + 0.5))); // tap2wav formula
@@ -157,7 +157,7 @@ static void toggle_wave_data(void )
static void cbm_output_wave( INT16 **buffer, int length )
{
- if (buffer == NULL)
+ if (buffer == nullptr)
return;
for( ; length > 0; length-- )
@@ -187,7 +187,7 @@ static int cbm_tap_do_work( INT16 **buffer, int length, const UINT8 *data )
/* int waveamp_high, waveamp_low; */
/* Log .TAP info but only once */
- if (!(buffer == NULL))
+ if (!(buffer == nullptr))
{
LOG_FORMATS("TAP version : %d\n", version);
LOG_FORMATS("Machine type : %d\n", system);
@@ -204,7 +204,7 @@ static int cbm_tap_do_work( INT16 **buffer, int length, const UINT8 *data )
}
/* is the .tap file corrupted? */
- if ((data == NULL) || (length <= CBM_HEADER_SIZE))
+ if ((data == nullptr) || (length <= CBM_HEADER_SIZE))
return -1;
@@ -321,7 +321,7 @@ static int cbm_tap_do_work( INT16 **buffer, int length, const UINT8 *data )
static int cbm_tap_to_wav_size( const UINT8 *tapdata, int taplen )
{
- int size = cbm_tap_do_work(NULL, taplen, tapdata);
+ int size = cbm_tap_do_work(nullptr, taplen, tapdata);
len = taplen;
return size;
@@ -364,7 +364,7 @@ static const struct CassetteFormat cbm_tap_cassette_format = {
"tap",
cbm_cassette_identify,
cbm_cassette_load,
- NULL
+ nullptr
};