当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: 本人应朋友之需要,动手写了一个基于WINAMP2的音效插件:消歌声处理。
 

 

    摘要: windows的编程模型不同于传统的c语言结构化编程,就是ms-dos编程模型,先把两者做一比较,以对 windows编程模型有一初步认识。 第一,用c语言编写基于ms-dos的应用程序时,唯一绝对需要的是一个名为main的函数。当用户运行程序时,操作系统调用main,并且从这里开始可以使用任何需要的编程结构。如果程序需要获得用户键击或系统服务,便可调用适当的函数,例如getchar,或可以使用......
    摘要:最近写了一个小的管理软件,在初始页logo里加入了视频,这里正好由于公司做图形这块,于是这里就牵涉到了这个视频文件的保密问题, 其实也没什么,但是这个小文件虽然简单,但也不能让他们自己拿出去做广告吧,因为是免费提供给他们的.这里讨论一下文件的保密,希望有兴趣的朋友一起来讨论一下. 先看一下软件的界面吧: 虽然这个软件不大,但是却是一个人完成,累啊! 对于开头的log,本来我......


自己动手,用VC开发WINAMP的音效插件

本人应朋友之需要,动手写了一个基于winamp2的音效插件:消歌声处理. 相关的开发文档均来自于winamp的官方网站,如果你对些感兴趣,可访:http://www.winamp.com/来了解关于插件开发的详细资料, 下面我简单地介绍一下dsp(音效)插件的编写.并给出部分源代码,完整的代码请从这里下载:().

#ifndef  _winamp_dsp_h_ 【程序编程相关:追根究底,MFC六大关键技术剖析(第三部

winamp2的插件是一个win32的动态链接库,它位于winamp的安装目录下的plugins目录里,每个插件都符合一定的命名规则,并有一个指定的导出函数.winamp主程序枚举该目录下的这些dll,来确定你安装了哪些插件.winamp的插件有许多种.你打开winamp的插件配置就看到了.音效插件是其中的一种.在winamp中简称为dsp.该类插件winamp规定其命名方式为dsp_*.dll,其中的“*”为你自已定义的一个任意名字.每个dsp插件都导出一个名为“winampdspgetheader2”的函数.它返回一个模块头信息结构的地址.winamp网站给开发者们提供了一个dsp模块的头文件.对该结构及函数作了定义,该头文件名为"dsp.h",内容如下: 【推荐阅读:网络socket学习笔记(1)

#if _msc_ver > 1000#pragma once#endif // _msc_ver > 1000 【扩展信息:基于MFC对话框的OpenGL类

#define  _winamp_dsp_h_

// dsp plugin interface

// notes:// any window that remains in foreground should optimally pass unused// keystrokes to the parent (winamps) window, so that the user// can still control it. as for storing configuration,// configuration data should be stored in <dll directory>\plugin.ini// (look at the vis plugin for configuration code)

typedef struct winampdspmodule {  char *description;  // description  hwnd hwndparent;   // parent window (filled in by calling app)  hinstance hdllinstance; // instance handle to this dll (filled in by calling app)

  void (*config)(struct winampdspmodule *this_mod);  // configuration dialog (if needed)  int (*init)(struct winampdspmodule *this_mod);     // 0 on success, creates window, etc (if needed)

  // modify waveform samples: returns number of samples to actually write  // (typically numsamples, but no more than twice numsamples, and no less than half numsamples)  // numsamples should always be at least 128. should, but im not sure  int (*modifysamples)(struct winampdspmodule *this_mod, short int *samples, int numsamples, int bps, int nch, int srate);     void (*quit)(struct winampdspmodule *this_mod);    // called when unloading

  void *userdata; // user data, optional} winampdspmodule;

typedef struct {  int version;       // dsp_hdrver  char *description; // description of library  winampdspmodule* (*getmodule)(int); // module retrieval function} winampdspheader;

// exported symbolstypedef winampdspheader* (*winampdspgetheadertype)();

// header version: 0x20 == 0.20 == winamp 2.0#define dsp_hdrver 0x20

#endif /* _winamp_dsp_h_ */


...   下一页
 ·使用directshow播放mpeg的基类     »显示摘要«
    摘要://// cdxgraph.h//#ifndef __h_cdxgraph__#define __h_cdxgraph__// filter graph notification to the specified window#define wm_graphnotify (wm_user+20)#include "dshow.h"#include "amstream.......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE