问题出在那里
c++吧
全部回复
仅看楼主
level 1
439702 楼主
我的东西是在另一个程序移过来的那个没问题
静态调用   ds::AddSound("MainMenu.WAV", false);
   声明   static int AddSound(char* filename, bool use3DSound);
定义
int ds::AddSound(char* filename, bool use3DSound)
{
     if (s_soundMap[filename] == NULL)
     {         if (use3DSound)//
         {
         s_soundMap[filename] = Create3DSoundBuffer(filename);    
          }
         else
         {
         s_soundMap[filename] = CreateSoundBuffer(filename);    
         }
     }     else    {
         debug::MessageBox("多次初始化声音!");
         return 0;     }
     return 1;
}

2011年04月21日 13点04分 1
level 12
那个图片貌似是说引用目标不正确...
2011年04月21日 13点04分 2
level 1
439702 楼主
    就是这一句出问题了    if (use3DSound)//
我把定义改成
int ds::AddSound(char* filename, bool use3DSound)
{
      if (s_soundMap[filename] == NULL)
      {          if (1)//
debug::MessageBox("多次初始化声音!");
          {
          s_soundMap[filename] = Create3DSoundBuffer(filename);    
           }
          else
          {
          s_soundMap[filename] = CreateSoundBuffer(filename);    
          }
      }      else     {
          debug::MessageBox("多次初始化声音!");
          return 0;      }
      return 1;
}
就可以弹出   多次初始化声音 的窗口

2011年04月21日 13点04分 3
level 1
439702 楼主
我有把定义改成
int ds::AddSound(char* filename, bool use3DSound)
{
       if (s_soundMap[filename] == NULL)
       {           if (use3DSound)//
debug::MessageBox("多次初始化声音!");
           {
           s_soundMap[filename] = Create3DSoundBuffer(filename);    
            }
           else
           {
           s_soundMap[filename] = CreateSoundBuffer(filename);    
           }
       }       else      {
           debug::MessageBox("多次初始化声音!");
           return 0;       }
       return 1;
}
就又会出现

2011年04月21日 13点04分 4
level 1
439702 楼主
我是自学的摸笑我哦
2011年04月21日 13点04分 5
level 12
嗯~use3DSound...貌似编译器不认得...
2011年04月21日 13点04分 6
level 12
没有 很强 真的
2011年04月21日 13点04分 7
level 1
439702 楼主

2011年04月21日 13点04分 8
1