Mail Archives: djgpp/1998/07/05/12:12:46
Ok, here ya go, Sound.C won't compile if I change Sound.h, or the header
files in Sound.h for example.
//
// Sound.C
//
// Jeremiah Zanin
// 6/30/98
//
#include <assert.h>
#include <string.h>
#include "Sound.h"
void Sound::loadFromWAV(const Wav& wav) {
isPCM = (bool)(wav.format.tag == 1);
bitsPerChannel = wav.format.bitsPerSample;
numberOfChannels = wav.format.numberOfChannels;
sampleRate = wav.format.sampleRate;
length = wav.dataChunk.soundLength;
data = new ubyte[length];
assert(data);
memcpy(data, wav.dataChunk.soundData, length);
currentPosition = 0;
}
void Sound::loadFromVOC(const Voc& voc) {
}
//
// Sound.h
//
// Jeremiah Zanin
// 6/30/98
//
#ifndef SOUND_H
#define SOUND_H
#include "Wav.h"
#include "Voc.h"
#include "Types.h"
class Sound {
public:
void loadFromWAV(const Wav& wav);
void loadFromVOC(const Voc& voc);
bool isPCM;
ubyte bitsPerChannel; // 8 or 16-bit
ubyte numberOfChannels; // 1 = mono, 2 = stereo
uint16 sampleRate;
uint32 length;
ubyte* data;
uint32 currentPosition; // current position in data
};
#endif
Here's Sound.d:
Sound.o: Sound.C Sound.h Wav.h Types.h Voc.h
Thanks for you help.
-----Original Message-----
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Jeremiah Zanin <jzanin AT cs DOT unm DOT edu>
Cc: djgpp AT delorie DOT com <djgpp AT delorie DOT com>
Date: Sunday, July 05, 1998 7:17 AM
Subject: Re: Automatic dependancies and header files, help!
>
>On Sat, 4 Jul 1998, Jeremiah Zanin wrote:
>
>> DEPS := $(wildcard *.d)
>> ifneq ($(DEPS),)
>> include $(DEPS)
>> endif
>>
>> The only problem is that when I change a header file, the C files that
>> depend on it don't get recompiled. What's going on?
>
>Please post the shortest source file that can be used to reproduce the
>problem, and the .d file generated by GCC for that source file.
- Raw text -