pkgsrc/audio/spiralloops/patches/patch-ar
marino d7480e61d4 audio/spiralloops: Fix iostream / Fix DragonFly / amd64
Replace <iostream.h> and <fstream.h> with their c++ counterparts.
Addition of <string.h> was originally under a DragonFly macro, but
this was removed when it was shown NetBSD 5.99 x86_64 needed it too.
Allow package to build on all x86_64 architectures.
2011-11-23 08:20:38 +00:00

37 lines
922 B
Text

$NetBSD: patch-ar,v 1.2 2011/11/23 08:20:38 marino Exp $
--- SpiralSound/Sample.h.orig 2001-04-19 20:48:13.000000000 +0000
+++ SpiralSound/Sample.h
@@ -21,6 +21,7 @@
#include <assert.h>
#include <iostream>
+#include <string.h>
#include "SpiralInfo.h"
static const unsigned short UMAX_LEV = 65535;
@@ -63,13 +64,13 @@ public:
void Shrink(int Length);
void CropTo(int NewLength);
- inline short &Sample::operator[](int i) const
+ inline short &operator[](int i) const
{
assert(i>=0 && i<m_Length);
return m_Data[i];
}
- inline void Sample::Set(int i, long int v)
+ inline void Set(int i, long int v)
{
assert(i>=0 && i<m_Length);
// clip
@@ -79,7 +80,7 @@ public:
m_Data[i]=(short)v;
}
- inline Sample &Sample::operator=(const Sample &rhs)
+ inline Sample &operator=(const Sample &rhs)
{
Allocate(rhs.GetLength());
memcpy(m_Data,rhs.GetBuffer(),GetLengthInBytes());