www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/05/12:12:46

Message-ID: <002001bda82f$690e0e20$2b0e1881@pegasus.unm.edu>
From: "Jeremiah Zanin" <jzanin AT cs DOT unm DOT edu>
To: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Cc: <djgpp AT delorie DOT com>
Subject: Re: Automatic dependancies and header files, help!
Date: Sun, 5 Jul 1998 10:10:17 -0600

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019