需要.NET专家来帮助我使用BASS modplayer的资源。 [英] Need .NET experts to help me use resources with BASS modplayer.

查看:86
本文介绍了需要.NET专家来帮助我使用BASS modplayer的资源。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已成功实施BASS [ http://www.un4seen.com/ ]我可以用它来播放我想要的文件。



我还有的问题是:如果我需要分享我的应用程序,我还需要找到它播放的相应曲目,并且该曲目必须放在计算机上的特定位置(固定路径),否则它根本不会播放。



我想在我的项目中添加我的modfiles作为资源然后从那里(本地)播放它,所以它可以从我的应用程序运行的任何位置立即工作,我不必一直发送我的modfiles。 br />
不能似乎让这个工作变得简单:

只需添加为资源并使用''资源路径''[例如Properties.Resources.Trackname]而不是''location as string''[例如C:\ Test \ Trackname.mod])。



我试图在提到的网站上为BASS官方论坛寻求帮助上面,但似乎没有人知道它是如何工作的,因为他们不用C#(.NET)编程......非常好。



这是保持我现在忙了一个多月了,这里有人知道或者可以找到:

如何使用BASS模拟器从资源播放一个modfile?



BASS实施后的工作代码,用于在计算机上播放文件:

 使用 Un4seen 。低音; 
int vol = 10000 ;
Bass.BASS_Init(-1, 44100 ,BASSInit.BASS_DEVICE_DEFAULT, IntPtr .Zero);
int load = Bass.BASS_MusicLoad( C:\\Test \\ TestTrack.mod 0 0 ,BASSFlag.BASS_SAMPLE_LOOP, 0 );
Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_GVOL_MUSIC,vol);
Bass.BASS_ChannelPlay(加载, false );



所以我想改变

  //  这个: 
MusicLoad ( C:\\Test \\TestTrack.mod,...)
// 收件人:
MusicLoad(Properties.Resources.TestTrack,.. 。)



还有播放的音乐,这不会用这种方式工作。

在BASS论坛上,他们说必须使用.NET中的资源导入方法,而不是BASS本身的功能。



任何想法?

解决方案

< blockquote> 我仍然遇到的问题是:如果我需要共享我的应用程序,我还需要找到它播放的相应曲目,并且该曲目必须放在计算机上的特定位置(固定路径)或者它赢了当然没有玩。



然后你的程序需要修改,以便从用户提供的任何位置读取文件。

I''ve succesfully implemented BASS [http://www.un4seen.com/] and I can use this to play the files I want.

The problem I still have is: if I need to share my app, I also need to find the corresponding track it plays and that track must be placed on a specific location on the computer (fixed path) or it won''t play at all of course.

I want to add my modfiles as a resource in my project and then play it from there (locally), so it works instantly from any location my apps run and I don''t have to send my modfiles all the time.
I can''t seem to get this working the easy way:
just add as resource and use ''resource path'' [e.g. Properties.Resources.Trackname] instead of ''location as string'' [e.g. "C:\Test\Trackname.mod"]).

I''ve tried to search for help at the official forum for BASS at the website mentioned above, but no one seems to know how it works, as they don''t program in C# (.NET)... Very nice.

This is keeping me busy for over a month now, is there someone here that knows or can find out:
How to play a modfile from resource using the BASS modplayer?

Working code after BASS-implementation to play files on the computer:

using Un4seen.Bass;
        int vol = 10000;
            Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);
            int load = Bass.BASS_MusicLoad("C:\\Test\\TestTrack.mod", 0, 0, BASSFlag.BASS_SAMPLE_LOOP, 0);
            Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_GVOL_MUSIC, vol);
            Bass.BASS_ChannelPlay(load, false);


So I want to change

// This:
MusicLoad("C:\\Test\\TestTrack.mod", ... )
// To:
MusicLoad(Properties.Resources.TestTrack, ... )


And still have the playing music, which won''t work this way.
At the BASS forum they said it had to do with resource importing methods from .NET, not with functions of BASS itself.

Any ideas?

解决方案

The problem I still have is: if I need to share my app, I also need to find the corresponding track it plays and that track must be placed on a specific location on the computer (fixed path) or it won''t play at all of course.

Then your program needs to be modified to read files from any location as provided by the user.


这篇关于需要.NET专家来帮助我使用BASS modplayer的资源。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆