~ubuntu-branches/debian/experimental/mednafen/experimental

« back to all changes in this revision

Viewing changes to src/nes/sound.cpp

  • Committer: Package Import Robot
  • Author(s): Stephen Kitt
  • Date: 2012-01-31 07:21:35 UTC
  • mfrom: (1.2.8)
  • Revision ID: package-import@ubuntu.com-20120131072135-es3dj12y00xcnrsk
Tags: 0.9.19-1
* New upstream WIP version.
* Update copyright information.
* Refresh use-system-tremor.patch and remove psx-big-endian-only.patch.
* Add spelling-fixes.patch based on Lintian's recommendations.
* Build-depend on debhelper 9 or later and remove corresponding Lintian
  override.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
#define SQ_SHIFT        8
28
28
#define TRINPCM_SHIFT   0
 
29
#include <math.h>
29
30
 
30
31
static void DoSQ1(void);
31
32
static void DoSQ2(void);
777
778
 
778
779
     #if 0
779
780
     {
780
 
      static uint32 meow = 0;
781
 
      *tmpo = (((meow & 32) * 65535) / 32) - 32768; //(meow & 32) * 29200 / 32;
782
 
      meow++;
 
781
static double phase = 0;
 
782
static double phase_inc = 0.000;
 
783
static double phase_inc_inc = 0.000000001;
 
784
 
 
785
 *tmpo = 16384 * sin(phase);
 
786
 phase += phase_inc;
 
787
 phase_inc += phase_inc_inc;
 
788
 
 
789
      //static uint32 meow = 0;
 
790
      //*tmpo = (((meow & 32) * 65535) / 32) - 32768; //(meow & 32) * 29200 / 32;
 
791
      //meow++;
783
792
      // *tmpo = (rand() & 0x7FFF) * 28000 / 32768;
784
793
      //*tmpo = (int16)(rand() & 0xFFFF); // * 28000 * 2 / 32768;
785
794
     }