zoukankan      html  css  js  c++  java
  • Lazarus 0.9.31 编译 BASS 音频库 的例子,不能播放中文名的 MP3 的解决。

    {使用 Lazarus + Bass 来测试跨平台,在 Ubuntu 中很正常,在 Windows 中只能播放英文名的 MP3,
    看了一下官方例子,应该是以下的问题。
    }
    var
      f: PChar;
      s: string;
    
    begin
      if not OpenDialog2.Execute then Exit;
      s := OpenDialog2.FileName;
    
      //f := Pchar(s);
      f:= Pchar(Utf8ToAnsi(s)); //修改为这个,该死的编码。。。
    
      strs[strc] := BASS_StreamCreateFile(False, f ,0, 0, 0);
      if strs[strc] <> 0 then
      begin
        ListBox3.Items.Add(OpenDialog2.FileName);
        Inc(strc);
      end
      else
        Error('Error creating stream!');
    end; 
    
  • 相关阅读:
    Ubuntu下RabbitMq 安装与运行
    web_api所需包
    Ubuntu16.04下安装python3.6.4详细步骤
    JavaScript
    css
    html
    MySQL
    day4 函数
    day3 字典,集合,文件
    day2
  • 原文地址:https://www.cnblogs.com/sail2000/p/1981513.html
Copyright © 2011-2022 走看看