diff modules/bluespec/Pygar/core/AudioCoreRRR.cpp @ 23:90197e3375e2 pygar svn.24

[svn r24] added testing, but something is wrong with our c++ file.
author rlm
date Wed, 28 Apr 2010 08:19:09 -0400
parents 0cfbb1e2de22
children 220c14f5963c
line wrap: on
line diff
     1.1 --- a/modules/bluespec/Pygar/core/AudioCoreRRR.cpp	Wed Apr 28 00:40:15 2010 -0400
     1.2 +++ b/modules/bluespec/Pygar/core/AudioCoreRRR.cpp	Wed Apr 28 08:19:09 2010 -0400
     1.3 @@ -19,7 +19,8 @@
     1.4    serverStub(new AUDIOCORERRR_SERVER_STUB_CLASS(this))
     1.5  {
     1.6      // instantiate stub
     1.7 -    printf("AUDIOCORERRR init called\n");
     1.8 +
     1.9 +    printf("rlm: init called\n\n");
    1.10      outputFile = NULL;
    1.11      memory = NULL;
    1.12      fflush(stdout);
    1.13 @@ -28,6 +29,7 @@
    1.14  // destructor
    1.15  AUDIOCORERRR_SERVER_CLASS::~AUDIOCORERRR_SERVER_CLASS()
    1.16  {
    1.17 +  printf("rlm:  AUDIOCORERRR_SERVER_CLASS::~AUDIOCORERRR_SERVER_CLASS()\n");
    1.18      Cleanup();
    1.19  }
    1.20  
    1.21 @@ -35,21 +37,24 @@
    1.22  void
    1.23  AUDIOCORERRR_SERVER_CLASS::Init(PLATFORMS_MODULE p)
    1.24  {
    1.25 -    parent = p;
    1.26 +  printf("rlm: AUDIOCORERRR_SERVER_CLASS::Init(PLATFORMS_MODULE p)\n");
    1.27 +  parent = p;
    1.28  }
    1.29  
    1.30  // uninit
    1.31  void
    1.32  AUDIOCORERRR_SERVER_CLASS::Uninit()
    1.33  {
    1.34 -    Cleanup();
    1.35 +  printf("rlm:  AUDIOCORERRR_SERVER_CLASS::Uninit()\n");
    1.36 +  Cleanup();
    1.37  }
    1.38  
    1.39  // cleanup
    1.40  void
    1.41  AUDIOCORERRR_SERVER_CLASS::Cleanup()
    1.42  {
    1.43 -    delete serverStub;
    1.44 +  printf("rlm: AUDIOCORERRR_SERVER_CLASS::Cleanup() \n\n");
    1.45 +  delete serverStub;
    1.46  }
    1.47  
    1.48  
    1.49 @@ -61,7 +66,7 @@
    1.50  AUDIOCORERRR_SERVER_CLASS::MemoryRequestLoad (UINT32 address)
    1.51  {
    1.52    UINT32 returnVal;
    1.53 -  
    1.54 +  printf("rlm: AUDIOCORERRR_SERVER_CLASS::MemoryRequestLoad (UINT32 address)\n");
    1.55    if(memory == NULL) {
    1.56      memory = new FUNCP_SIMULATED_MEMORY_CLASS();
    1.57    }
    1.58 @@ -74,6 +79,7 @@
    1.59  void
    1.60  AUDIOCORERRR_SERVER_CLASS::MemoryRequestStore (UINT32 address, UINT32 data)
    1.61  {
    1.62 +  printf("rlm: AUDIOCORERRR_SERVER_CLASS::MemoryRequestStore (UINT32 address, UINT32 data)\n");
    1.63    if(memory == NULL) {
    1.64      memory = new FUNCP_SIMULATED_MEMORY_CLASS();
    1.65    }
    1.66 @@ -86,14 +92,17 @@
    1.67  AUDIOCORERRR_SERVER_CLASS::SendProcessedStream(UINT16 control, UINT16 data)
    1.68  {
    1.69  
    1.70 +  printf("rlm: SendProcessedStream called,\n");
    1.71    AudioProcessorControl audioProcessorControl = (AudioProcessorControl) control;
    1.72    switch(control) {
    1.73      case EndOfFile:
    1.74        if(outputFile != NULL) {
    1.75 +	printf("rlm: FILE is NULL\n");
    1.76          fflush(outputFile);
    1.77          fclose(outputFile);
    1.78          outputFile = NULL;
    1.79        } else {
    1.80 +	printf("rlm: Opening file for output.\n");
    1.81          outputFile = fopen("out_hw.pcm","w");
    1.82          assert(outputFile);
    1.83          fflush(outputFile);
    1.84 @@ -110,7 +119,8 @@
    1.85          assert(outputFile);
    1.86        }
    1.87  
    1.88 -      CONNECTED_APPLICATION_CLASS::UpdateSemaphore();  
    1.89 +      CONNECTED_APPLICATION_CLASS::UpdateSemaphore(); 
    1.90 +      printf("rlm: writing data to out_hw.pcm\n");
    1.91        fwrite(&data, 2,1 , outputFile);
    1.92      break;
    1.93    }