CN100578516C - Method and system for processing audio data in computer game - Google Patents

Method and system for processing audio data in computer game Download PDF

Info

Publication number
CN100578516C
CN100578516C CN 200710120272 CN200710120272A CN100578516C CN 100578516 C CN100578516 C CN 100578516C CN 200710120272 CN200710120272 CN 200710120272 CN 200710120272 A CN200710120272 A CN 200710120272A CN 100578516 C CN100578516 C CN 100578516C
Authority
CN
Grant status
Grant
Patent type
Prior art keywords
audio data
game
information
module
user
Prior art date
Application number
CN 200710120272
Other languages
Chinese (zh)
Other versions
CN101105823A (en )
Inventor
王亚齐
Original Assignee
北京金山软件有限公司;北京金山数字娱乐科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Grant date

Links

Abstract

The invention provides a method and a system for processing audio data in computer games. The method includes: run computer games; obtain the route of audio data needed by the local client end; obtain the corresponding audio data and display related information of audio data on the current game interface; receive users' selection command and operation command; and mobilize the corresponding internal module in the computer game to complete the corresponding operation according to the audio data selected. The invention innovatively combines audio data of the local client end and audio processing programs of computer games, treating the former as a data source of the later to make it unnecessary to start another application program, thus saving system resources; in addition, the invention also provides the corresponding management operation module for the convenience of managing and operating audio data in the local client end at the internal of games by users.

Description

一种计算;^几游戏中处理音频数据的方法和系统 A computing; ^ several game method and system for processing audio data

技术领域 FIELD

本发明涉及计算机游戏领域,特别是涉及一种在计算机游戏中,处理音频数据的方法和系统,以及一种计算机游戏系统。 The present invention relates to the field of computer games, and more particularly to a method and system in computer games, processing audio data, and a computer game system.

背景技术 Background technique

计算机游戏特別是网络游戏、3D游戏逐渐成为流行的娱乐方式。 Computer games especially online games, 3D games gradually become a popular form of entertainment. 现有技术中,计算机游戏一般都可以很好的处理音视频数据,但是其所涉及的音频数据源都是该计算机游戏程序自身所拥有的。 Art, computer games generally be a good deal of audio and video data, but they involve audio data source is the computer game has its own program. 当然,该计算机游戏程序自身所拥有的音频数据可以来自于客户端,也可以来自于服务器端。 Of course, the computer game program itself can have the audio data from the client, it can also come from the server side. 需要说明的是,计算机游戏所涉及的客户端并不限于个人电脑,各种移动终端或者游戏终端都可以运行相应的计算沐/L游戏。 Incidentally, the computer game according to the client is not limited to a personal computer, a mobile terminal or a variety of game terminal can run a respective calculation Mu / L game.

在计算机游戏越来越普及的今天,人们提出了一种新的在计算机游戏中, 对音频数据进行处理的需求:人们希望能够玩计算机游戏的同时,还可以处理(例如,播放)本地客户端中的音频数据,以获得更多的游戏乐趣。 In the computer game more and more popular today, it proposed a new demand in computer games, audio data processing: People want to be able to play computer games can also handle (eg, play) local client audio data, to get more game fun.

现有技术中, 一个可行的方案是,用户运行当前计算机游戏的同时,开启另一个播放器程序,用于播放本地客户端中的音频数据。 In the prior art, a possible solution is, while the user is currently running a computer game, open another player program for playing audio data of the local client. 该方案固然可以在一定程度上满足人们的需求,但是其带来的缺陷也是非常明显的:首先,不方便用户的操作,因为用户需要在两个应用程序之间进行屏幕切换,然后才能进行管理和操作,对于经常需要全屏显示的计算机游戏而言更是如此;其次,同时运行两个应用程序,对本地系统资源的过度占用是显而易见的;并且,还会带来游戏内部的音频处理和游戏外部的音频处理之间的数据冲突。 The program can certainly meet a certain extent, people's needs, but the resulting defect is also very obvious: First, the user's operation is not convenient, because users need a screen to switch between the two applications before they can be managed and operations, often need a full screen display is especially true of computer games; secondly, to run two applications at the same time, excessive occupation of the local system resources is obvious; and, the game will bring internal audio processing and game data collision between the external audio processing.

总之,需要本领域技术人员迫切解决的一个技术问题就是:提出一种全新的、方便的、并节约资源的处理本地客户端中的音频数据的^L术方案。 In short, you need to be urgently addressed skilled in the art of a technical problem is this: propose a new, convenient, ^ L surgery program and resource-saving deal with local clients in the audio data.

发明内容 SUMMARY

本发明所要解决的技术问题是提供一种在计算机游戏中,处理本地客户端中的音频数据的方法和系统,能够减少对系统资源的占用,并方便用户管理和操作。 The present invention solves the technical problem is to provide a computer game, a processing method and system of the local client audio data, can reduce the usage of system resources and user management and operation. 为了解决上述问题,本发明公开了一种计算机游戏中处理音频数据的方 To solve the above problems, the present invention discloses a computer side audio processing game data

法,具体可以包括以下步骤: 步骤a、运行计算机游戏; Method may specifically include the following steps: step a, the computer running the game;

步骤b、获取本地客户端中所需音频数据的路径; Step b, obtaining the desired path to the local client audio data;

步骤c、开辟专用的搜索线程,在指定路径中遍历所有文件,获取相应的音频数据,获取所述音频数据的属性信息中的名称信息,并作为相关信息进行记录,如果没有名称信息,则将文件名作为相关信息进行记录,并在当前游戏界面中显示所述音频凝:据的相关信息; Step C, open thread dedicated search through all files in the specified path, to obtain the corresponding audio data, name information acquiring the attribute information of the audio data, and recorded as information, if there is no name information, the file name as relevant information is recorded, and displaying the current audio coagulation in the game interface: data-related information;

步骤d、接收用户的选择指令和操作指令; Step d, and receiving a user's selection instruction operation instruction;

步骤e、针对用户选择的音频数据,调用所述计算机游戏中相应的内部模块完成相应的操作。 Step E, for the audio data selected by the user, a computer game calling the corresponding internal module to complete the corresponding operation.

优选的,当用户的操作指令为播放指令时,所述步骤e可以进一步包括: 停止当前正在播放的游戏背景音频数据;以相同的播放配置信息,播放用户所选的音频数据。 Preferably, when the user's instruction to playback instruction, said step e further comprises: stop playing the background audio data currently being played; play the same configuration, the user selected audio data playback.

优选的,当用户的操作指令为将该音频数据传输至另一游戏客户端时,所述步骤e可以进一步包括:针对用户指定的另一游戏客户端,从服务器获取相应的IP地址信息;在本地游戏客户端和对方游戏客户端之间,建立P2P的通信连接;将用户所选的音频数据传送至对方游戏客户端,并保存至指定路径。 Preferably, when the user's instruction to transmit the audio data to the other game client, said step e may further comprise: a user-specified for the other game client, acquires the corresponding IP address information from the server; the between the local client and the other game game client, establish a P2P communication connection; the user-selected audio data to the other game client and saved to the specified path.

优选的,所述的方法还可以包括:接收用户针对特定音频数据的不再搜索指令,则在下一次音频数据的获取中,该音频数据不再被加入。 Preferably, the method may further comprise: receiving user, the next time for obtaining the specific instruction will not search for audio data audio data, the audio data is no longer added.

依据本发明的另一实施例,还公开了一种计算机游戏中处理音频数据的装置,该装置设置在计算机游戏系统中,该装置具体可以包括: According to another embodiment of the present invention, there is disclosed a computer game device of processing audio data, the apparatus is provided in a computer game system, the apparatus may specifically include:

路径获取模块,用于获取本地客户端中所需音频数据的路径; A path obtaining means for obtaining the desired path to the local client audio data;

音频数据获取模块,用于开辟专用的搜索线程,在指定路径中遍历所有文件,获取相应的音频数据,获取所述音频数据的属性信息中的名称信息,并作为相关信息进行记录,如果没有名称信息,则将文件名作为相关信息进行记录, 并在当前游戏界面中显示所述音频数据的相关信息; The audio data acquisition module configured to open thread dedicated search through all files in the specified path, to obtain the corresponding audio data, name information acquiring the attribute information of the audio data, and recorded as information, if no name information, the file name as relevant information is recorded, and display related information of the audio data in the current game interface;

指令接收模块,用于接收用户的选择指令和操作指令; Instruction receiving means for receiving a user's selection instruction and an operation instruction;

音频数据处理模块,用于针对用户选4奪的音频数据,调用所述计算机游戏中相应的内部模块完成相应的操作。 An audio data processing module configured for user 4 wins selected audio data, a computer game calling the corresponding internal module to complete the corresponding operation.

优选的,当用户的操作指令为播放指令时,所述音频数据处理模块进一步 Preferably, when the user's operation instruction to play instruction, the audio data processing module is further

包括:停止子模块,用于停止当前正在播放的游戏背景音频数据;调用子模块, 用于调用计算机游戏系统中的原音频播放模块,以相同的播放配置信息,播放用户所选的音频数据。 Comprising: a sub-module to stop, for stopping the game background audio data currently being played; sub-module call, calling for a computer game system module original audio playback, playback configuration information is the same, the user selected audio data playback.

优选的,当用户的才喿作指令为将该音频数据传输至另一游戏客户端时,所述音频数据处理模块进一步包括:玩家指定子模块,用于指定音频数据传输的对方游戏客户端;地址获取子模块,用于针对用户指定的另一游戏客户端,从服务器获取相应的IP地址信息;通信模块,用于在本地游戏客户端和对方游戏客户端之间,建立P2P的通信连接;以及,将用户所选的音频数据传送至对方游戏客户端,并保存至指定路径。 Preferably, when the user's instruction before Qiao as the audio data transmitted to the other game client, the audio data processing module further comprises: a player to specify sub-module, for designating the audio data transfer partner game client; address acquisition sub-module, configured for the user to specify the other game client, acquires the corresponding IP address information from the server; a communication module for local game between the client and the other game client, establish a P2P communication connection; and the user-selected audio data to the other game client and saved to the specified path.

优选的,所述音频数据获取模块进一步可以包括:搜索子模块,用于开辟专用的搜索线程;以及,在指定路径中遍历所有文件,获取相应的音频数据; 相关信息获取子模块,用于获取所述音频数据的属性信息中的名称信息,并作为相关信息进行记录;如果没有名称信息,则将文件名作为相关信息进行记录; 显示子模块,用于在当前游戏界面中显示所述音频数据的相关信息。 Preferably, the audio data acquisition module may further comprise: a search sub-module, configured to open a dedicated search threads; and, traversing all files in the specified path, to obtain the corresponding audio data; related information obtaining sub-module, configured to obtain the attribute information of the audio data in the name information, and recording as information; name if there is no information, the file name as relevant information is recorded; display module for displaying the audio data in the current game interface relevant information.

依据本发明的另一个实施例,公开了一种计算机游戏系统,包括: 计算机游戏模块,用于提供具有音频播放功能的计算机游戏本身; 路径获取模块,用于获取本地客户端中所需音频数据的路径; 音频数据获取模块,用于开辟专用的搜索线程,在指定路径中遍历所有文 According to another embodiment of the present invention, discloses a computer game system, comprising: a computer game module, for providing an audio playback computer game itself; path acquiring module, configured to obtain a local client, the desired audio data path; audio data acquisition module, used to open up a dedicated search thread through all the files in the specified path

件,获取相应的音频数据,获取所述音频数据的属性信息中的名称信息,并作 Member, to obtain the corresponding audio data, name information acquiring the attribute information of the audio data, and for

为相关信息进行记录,如果没有名称信息,则将文件名作为相关信息进行记录, It was recorded as related information, if there is no name information, the file name as the relevant information is recorded,

并在当前游戏界面中显示所述音频数据的相关信息; And displaying information about the audio data in the current game interface;

指令接收模块,用于接收用户的选择指令和操作指令; 音频数据处理模块,用于针对用户选择的音频数据,调用相应模块完成相 Instruction receiving means for receiving a user's selection instruction and the operation instruction; audio data processing module, configured for the audio data selected by the user, call the appropriate module to complete phase

应的操作。 Should the operation.

与现有技术相比,本发明具有以下优点: Compared with the prior art, the present invention has the following advantages:

本发明创新性的将本地客户端中的音频数据和计算机游戏中的音频处理程序结合起来,将前者作为后者的一个数据源进行处理,从而不需要再开启另一个应用程序,节约了系统资源;并且,本发明还提供了相应的管理操作模块,方面用户在游戏内部对本地客户端中的音频数据进行管理和操作。 The present invention is innovative program audio data to audio processing in the local client computer games and combined, the former as a data source for the latter process, so do not need to start another application, saving system resources ; the present invention also provides a corresponding operation module management, user management and operational aspects of the audio data in the local client within the game.

进而,本发明还提出了通过P2P的方式实现音频数据的共享和传输,首先, 通过直接传输音频数据的方式,可以保证音质;其次,通过P2P的数据传输方式可以降低对服务器资源的过多占用,尤其对于网络游戏更是如此。 Further, the present invention also provides for audio transmission and sharing data through P2P manner, firstly, by way of direct transmission of audio data, the sound quality can be guaranteed; secondly, can be reduced up too much resources on the server by the data transmission P2P , especially for online games even more so.

附图说明 BRIEF DESCRIPTION

图1是一种计算机游戏中处理音频数据的方法实施例; 图2是一种计算机游戏中处理音频数据的装置实施例; 图3是一种计算机游戏系统实施例。 FIG 1 is an embodiment of a method for a computer game processing audio data; FIG. 2 is an embodiment of a device for a computer game processing audio data; FIG. 3 is an embodiment of a computer game system.

具体实施方式 detailed description

为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明作进一步详细的说明。 For the above objects, features and advantages of the invention more comprehensible, the present invention is further the following detailed description in conjunction with the accompanying drawings and specific embodiments.

本发明所涉及的计算机游戏可以包括各种类型的计算机游戏,尤其是网络游戏。 The present invention relates to a computer game may include various types of computer games, especially online games.

本发明所提供的技术方案可用于众多通用或专用的计算系统环境或配置中。 The present invention provides a technical solution with numerous general purpose or special purpose computing system environments or configurations. 例如:个人计算机、服务器计算机、手持设备或便携式设备、平板型设备、 多处理器系统、基于微处理器的系统、置顶盒、可编程的消费电子设备、网络PC、小型计算机、大型计算机、包括以上任何系统或设备的分布式计算环境**。 For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PC, minicomputers, mainframe computers, comprising any of the above systems or devices, distributed computing environments **.

本发明所提供的技术方案可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。 The present invention provides a technical solution described in the general context of computer-executable instructions, executed by a computer, such as program modules. 一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。 Generally, program modules include performing particular tasks or implement particular abstract data types routines, programs, objects, components, data structures, and the like. 也可以在分布式计算环境中实践本发明,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。 The present invention may also be practiced in a distributed computing environment, the distributed computing environments, where tasks are performed by remote processing devices that are linked through a communications network. 在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。 In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices in.

参照图1,示出了本发明一种计算机游戏中处理音频数据的方法实施例, 具体可以包括: Referring to Figure 1, there is shown a method of the present invention, a computer game in the embodiment of processing audio data, specifically comprising:

步骤IOI、运行计算机游戏;本实施例所涉及的计算机游戏包括但不限于以下的游戏类型:动作冒险类、策略战略类,角色扮演类、运动竟技类等等。 Step IOI, a computer running the game; in this embodiment relates to a computer game, including but not limited to, Genre: Action adventure, strategy-based strategy, role-playing, sports racing class and the like. 步骤102、获取本地客户端中所需音频数据的路径, 一般的实现方式可以为,到预定的存储位置读取即可。 Step 102, the path acquires a local client, the desired audio data, the general mode may be implemented, to a predetermined storage location can be read.

该路径可以首先为一个默认路径,例如,游戏安装目录等。 The path can be a first for the default path, for example, the game installation directory and so on. 当然,也可以由用户(玩家)指定一个路径,例如,指定用户希望的音频数据文件的所在文件夹。 Of course, you can also specify a path by the user (player), for example, where the user specifies the desired audio file data files. 该指定过程可以在游戏程序运行之前,也可以在游戏程序启动之后、路径读取之前。 The process can be specified before the game is running, you can start the program after the game, read before the path.

步骤103、获取相应的音频数据,并在当前游戏界面中显示所述音频数据的相关信息; 一般的实现方式可以为,遍历前述的路径即可。 Step 103, to obtain the corresponding audio data, and displays related information of the audio data in the current game interface; general implementation may, of the traverse path.

在本发明的一个优选实施例中,可以通过以下方式完成步骤103中音频数据的获取:首先,开辟专用的搜索线程;然后,在指定路径中遍历所有文件, 获取相应的音频数据;最后,获取所述音频数据的属性信息中的名称信息,并作为相关信息进行记录;如果没有名称信息,则将文件名作为相关信息进行记录。 In a preferred embodiment of the invention, the acquisition step 103, the audio data can be accomplished in the following manner: First, open-dedicated search thread; then traversing all files in the specified path, to obtain the corresponding audio data; Finally, obtaining the name of the attribute information of the audio information data and recorded as related information; name if there is no information, the file name as relevant information is recorded.

至于所述音频数据相关信息的在游戏界面中的显示区域和显示方式,本发明并不需要加以限定。 As for the display region and display the information related to the audio data in the game interface, the present invention does not require to be defined.

优选的,用户针对搜索到的音频数据,可以进行各种各样的管理行为,例如,排序、删除、重命名等等。 Preferably, the user to search for audio data, can be a variety of management behavior, for example, sort, delete, rename, and so on. 进一步,用户还可以指定某个音频数据不再搜索,即该音频数据在下一次的搜索过程中不再加入结果列表。 Further, the user can also specify the audio data is no longer a search, that is, the audio data of the next search process is no longer added to the list of results.

步骤104、接收用户的选择指令和操作指令; Step 104 receives a user's selection instruction and the operation instruction;

步骤105、针对用户选择的音频数据,调用所述计算机游戏中相应的内部模块完成相应的操作。 Step 105, for the audio data selected by a user, a computer game calling the corresponding internal module to complete the corresponding operation.

在本发明的一优选实施例中,当用户的操作指令为播放指令时,所述步骤105进一步可以包括以下子步骤:首先,停止当前正在播放的游戏背景音频数据;然后,以相同的播放配置信息,播放用户所选的音频数据。 In a preferred embodiment of the present invention, when the user's operation instruction to playing instructions, step 105 may further comprise the following substeps: First, stop the game background audio data currently being played; then, play the same configuration information, the user selected audio data playback.

在本发明的另一优选实施例中,当用户的才喿作指令为将该音频数据传输至另一游戏客户端时,所述步骤105进一步可以包括以下子步骤: In another preferred embodiment of the present invention, only when the user's instruction Qiao as the audio data transmitted to the other game client, step 105 may further comprise the substeps of:

A、 针对用户指定的另一游戏客户端,从服务器获取相应的IP地址信息; A, for the user to specify the other game client, acquires the corresponding IP address information from the server;

B、 在本地游戏客户端和对方游戏客户端之间,建立P2P ( Point 2 Point, 点对点)的通信连接;上述过程主要应用于网络游戏中,通过优选的P2P传输方式,可以尽量少的占用网络游戏服务器的系统资源。 B, between the local client and the other game game client, establishing P2P (Point 2 Point, point to point) communication connection; and the process is mainly applied to the network game, by preferred P2P transmission mode, the network can occupy as little as possible game server system resources.

通过上述方法实施例的描述,可以得知,本发明能够在计算机游戏系统中提供一种可由玩家获取本地音乐,并传输给一个或多个玩家的功能,从而增加玩家的游戏乐趣,方便玩家之间的交流。 Examples of the above described methods, can be known, the present invention can provide a local music acquired by a player, and transmitted to the function of one or more players, thereby increasing the fun of the game player in a computer game system, the player easily between exchanges.

下面对P2P传输方式进行简单介绍。 Below the P2P transmission for a brief introduction.

P2P又称为对等互联网络技术,是一种用于不同PC (Personal Computer 的缩写,也就是个人计算机)用户之间,不经过中继设备直接交换数据或服务的技术。 P2P, also known as peering network technology, is a different PC for (abbreviation for Personal Computer, that is, personal computers) between users, without the direct exchange of technical data relay devices or services. 在P2P网络中,PC用户可以直接连接到其他用户的计算机,而不需要连接到服务器上再进行浏览与下载。 In P2P network, PC users can connect directly to another user's computer, without the need to connect to the server and then viewing and downloading. 例如,现在常用的数据驱动的P2P网络, 就具有以下特点: For example, now commonly used in data-driven P2P network, it has the following characteristics:

(1)网络由许多P2P节点构成,这些节点包括在线用户(即客户端)和服务器,其中每个节点都和一部分其他节点相连接,这些节点称为该节点的邻居; (1) P2P network consists of many nodes that include online users (i.e., clients) and servers, and wherein each node is connected to a portion of the other nodes, these nodes are called neighbors of the node;

(2 )每一个P2P节点周期性地与它的邻居交换数据块可用性信息; (3 )每一个P2P节点从它的邻居节点索取和接收自己所没有的数据块, 并将自己所拥有的数据块发送给向自己。 (2) Each node periodically P2P data block availability information exchange and its neighbors; (3) each P2P node request and receive data from the block does not have its own neighbor nodes, and the data blocks have their sent to yourself. 索取的邻居,即主要由数据块的接收方决定数据块的传播路径,且每一个数据块的传播路径可能不同。 Obtain neighbor, i.e., the propagation path of data blocks is mainly determined by the receiver block, and a block of data for each channel may be different.

参照图2,示出了一种计算机游戏中处理音频数据的装置实施例,其设置 Referring to Figure 2, there is shown a computer game apparatus in an embodiment of processing audio data, which is provided

在现有的计算机游戏系统中,该装置200具体可以包括: In the conventional game computer system, the apparatus 200 may comprise specifically:

路径获取模块201 ,用于获取本地客户端中所需音频数据的路径; 音频教:据获取模块202,用于获取相应的音频数据,并在当前游戏界面中 Route acquisition module 201, configured to obtain the desired path to the local client audio data; audio teachings: data acquisition module 202, configured to obtain the corresponding audio data, and the current game interface

显示所述音频数据的相关信息; 一般的,通过遍历指定路径中的音频数据即可 Displaying the correlation information of the audio data; general, audio data by traversing the path to the specified

实现获取; Achieve access;

指令接收模块203,用于接收用户的选择指令和操作指令; 音频数据处理模块204,用于针对用户选择的音频数据,调用所述计算机游戏中相应的内部模块完成相应的操作。 Instruction receiving module 203 for receiving a user's selection instruction and the operation instruction; audio processing module 204, used for the user-selected audio data, a computer game calling the corresponding internal module to complete the corresponding operation. 在本发明的一优选实施例中,当用户的操作指令为播放指令时,所述音频 In a preferred embodiment of the present invention, when the user's instruction operation instruction to play the audio

数据处理模块204可以进一步包括:停止子模块,用于停止当前正在播放的游戏背景音频数据;调用子模块,用于调用计算机游戏系统中的原音频播放模块, 以相同的播放配置信息,播放用户所选的音频数据。 The data processing module 204 may further comprising: a sub-module stop, for stopping the game background audio data currently being played; call sub-module, a computer game system for calling original audio playback module configuration information in the same play, playing the user the selected audio data.

在本发明的另一优选实施例中,当用户的操作指令为将该音频数据传输至另一游戏客户端时,所述音频数据处理^t块204可以进一步包括:玩家指定子模块,用于指定音频数据传输的对方游戏客户端;地址获取子模块,用于针对用户指定的另一游戏客户端,从服务器获取相应的IP地址信息;通信模块, 用于在本地游戏客户端和对方游戏客户端之间,建立P2P的通信连接;以及, 将用户所选的音频数据传送至对方游戏客户端,并保存至指定路径。 In another preferred embodiment of the present invention, when the user's operation instruction is transmitted to the audio data of a game client, the audio data processing block 204 ^ t may further comprise: a player to specify sub-module, for Specifies audio data counterpart game client; address acquisition sub-module, configured for the user to specify the other game client, acquires the corresponding IP address information from the server; a communication module for local game client and the other game client between the ends, establish a P2P communication connection; and the user-selected audio data to the other game client and saved to the specified path.

当然,对于音频数据的传输也可以通过服务器转发的方式实现,采用上述实现方式可以尽量少的占用网络游戏中服务器的系统资源。 Of course, for the transmission of audio data may be realized by way of forwarding server, the above-described implementations may occupy as little as possible in the network game system resource server.

在本发明的另一优选实施例中,音频数据获取模块202可以进一步包括: 搜索子模块,用于开辟专用的搜索线程;以及,在指定路径中遍历所有文件, 获取相应的音频数据;相关信息获取子模块,用于获取所述音频数据的属性信息中的名称信息,并作为相关信息进行记录;如果没有名称信息,则将文件名作为相关信息进行记录;显示子模块,用于在当前游戏界面中显示所述音频数据的相关信息。 In another preferred embodiment of the present invention, the audio data acquisition module 202 may further comprise: a search sub-module, configured to open a dedicated search threads; and, through all files in the specified path, to obtain the corresponding audio data; infos obtaining sub-module, configured to obtain information of the name of the attribute information of the audio data, and recorded as related information; name if there is no information, the file name as relevant information is recorded; display sub-module, for the current game display information about the audio data in the interface.

参照图3,示出了一种计算机游戏系统实施例,该系统300包括: 计算机游戏模块301,用于提供具有音频播放功能的计算机游戏本身; 路径获取模块302,用于获取本地客户端中所需音频凄t据的路径; 音频数据获取模块303,用于获取相应的音频数据,并在当前游戏界面中 Referring to Figure 3, there is shown an embodiment of a computer game system, the system 300 comprising: a computer game module 301, for providing an audio playback computer game itself; route acquisition module 302, configured to obtain a local client as t for an audio data path desolate; audio data acquisition module 303, configured to obtain the corresponding audio data, and the current game interface

显示所述音频凄t据的相关信息; Displaying the audio data sad t-related information;

指令接收模块304,用于接收用户的选4奪指令和操作指令; 音频数据处理模块305,用于针对用户选择的音频数据,调用相应模块完 Instruction receiving module 304 receives an instruction for selecting a user 4 wins and operation instruction; audio processing module 305, used for the user-selected audio data, call the appropriate module End

成相应的操作。 To the corresponding operation.

图3所示实施例的目的在于公开一个完整的、增加了处理本地音频数据功能的计算机游戏系统。 Figure 3 embodiment is that the purpose of a complete disclosure, a computer game system to increase the local audio data processing function.

下面以一个具体的流程,对本发明作进一步的说明:1、由用户通过输入指定音乐文件所在的文件夹,在游戏开始时自动进行 Below a specific process of the present invention will be further described: 1, designated by a user through the input music file folder where, at the start of the game automatically

更新并开始遍历过程,如果用户没有输入则默认为游戏安装目录; Update and start traversing process, if the user does not enter the default installation directory for the game;

2 、遍历整个文件夹中的文件并根据后缀名提取所有音乐文件(例如,.mp3, .wma等)并保存到游戏列表中;具体可以包括以下子步骤: 2.1 、由游戏主线程开辟专门用于搜索音乐文件的线程; 2.2、该线程以较小的CPU占用率,对整个指定文件夹进行文件遍历并记录所有的音乐文件(也可以指定格式,例如,.mp3, .wma等);其中,较小的CPU占用率含义为,该线程创建时设定的优先级较低,在操作系统如Windows管理下会分配较少的时间片于该线程,即较小的CPU占用率。 2, through the whole folder and file name suffix according to extracts of all music files (for example, .mp3, .wma, etc.) and save it to the list of games; specifically include the following sub-steps: 2.1, the game opened up by the main thread devoted thread search for music files; 2.2, the thread with a smaller CPU occupancy rate for the entire file to traverse the specified folder and record all music files (you can also specify the format, for example, .mp3, .wma, etc.); wherein , meaning less CPU usage is low set when the thread is created for priority and allocate less time slice under operating systems such as Windows to manage the thread that smaller CPU utilization. 由于音乐得搜索结果可以分批显示,用户也并不需要立刻就获得结果,所以采用低优先级线程虽然会造成比较长的运行时间,但是不会影响用户在游戏中的体验。 Because music can get search results in batches displayed, the user does not need to immediately get results, so a low priority thread, although it will result in a long running time, but does not affect the user experience in the game. 当然对于其他操作系统可能做法不尽相同,基本原理不变。 Of course, the practice may vary for other operating systems, the basic principles remain unchanged.

2.3 、搜集找到的音乐文件的属性信息中有关音乐名字方面的信息并将其保存到列表中,如果没有相关信息则将文件名作为信息保存;如果有相同的记录则不重复增加列表项; 2.3, the attribute information of music files to collect information about the music found in terms of name and save it to the list, if no relevant information will be stored as an information file name; if not repeat the same record increase in the list of items;

3、 在游戏界面窗口中显示当前搜索到的所有音乐文件; 3, displays all music files to the current search in the game interface window;

4、 用户对显示的音乐文件进行管理; 4, users manage music files displayed;

用户可以对当前列表中的项目进行选定、删除处理等等;如果用户勾选不再搜索的选项,则被删除的文件将会被记录,并在以后更新时不再被加入列表中; Users can be on the current list item is selected, the deletion process and so on; if the user check the option is no longer the search, were deleted file will be recorded, and when the update will no longer be added to the list;

5、 用户可以在本地播放选中的音乐文件;具体可以包括以下子步骤: 5, the user can play the selected music files locally; specifically include the following sub-steps:

5.1、 用户播放后首先停止当前正在播放的背景音乐; 5.1, users first stop playing background music that is currently playing;

5.2、 以相同的配置信息(音量,声道等)播放用户选中的音乐文件; 5.2, the user selects to play music files in the same configuration information (volume, channel, etc.);

6、 用户可以向对方客户端共享选中的音乐文件;具体可以包括以下子步 6, users can share selected music files to other clients; specifically include the following sub-steps

骤: Step:

6.1、 用户选择共享对象后从服务器获得对方的IP地址等信息并向对方发送邀请消息; 6.1, users choose to get the other side of the shared object from the server IP address and other information to the other party to send the invitation message;

6.2、 对方同意后尝试通过UDP的连接方式与对方建立P2P的连接; 6.2, the other party agreed to try to establish a connection with each other via the P2P connection of the UDP;

6.3、 连接长时间没有响应返回失败信息;6.4、 连接成功则开始传输该音乐文件至对方; 6.3, connected for a long time did not return a failure response information; 6.4, the connection is successful then began to transfer the music files to each other;

6.5、 音乐文件传输过程中如果失败则返回错误消息并提示续传; 6.5, a music file transfer process if it fails to return an error message and prompt resume;

6.6、 传输完毕后该文件保存到游戏相应目录中并自动添加到对方的音乐文件列表中; 6.6 After the transfer is complete save the file to the appropriate directory in the game and automatically added to the list of music files in the other;

6.7、 用户可以对该音乐文件进行相同的操作; 6.7, the user can perform the same operation on the music files;

6.8、 如果该文件已经存在于当前文件夹中,则自动对此文件进行改名到不重名。 6.8, if the file already exists in the current folder, this file is automatically renamed to not duplicate names.

本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。 In this specification various embodiments are described in a progressive way, differences from the embodiment and the other embodiments each of which emphasizes embodiment, the same portions similar between the various embodiments refer to each other. 对于系统实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。 For embodiments of the system, since the method of the embodiment which is substantially similar, the description is relatively simple, see Methods section of Example place related to embodiments described.

以上对本发明所4是供的一种计算机游戏中,处理音频数据的方法和系统, 进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时, 对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。 A computer game or more of the present invention 4 is available, the method and system for processing audio data, described in detail herein through specific examples of the principles and embodiments of the invention are set forth in description of the above embodiment only used to help understand the method and core idea of ​​the present invention; while those of ordinary skill in the art, according to the ideas of the present invention, there are changes in the embodiments and application scope of the, sum, this specification shall not be construed as limiting the present invention.

Claims (9)

  1. 1、一种计算机游戏中处理音频数据的方法,其特征在于,包括: 步骤a、运行计算机游戏; 步骤b、获取本地客户端中所需音频数据的路径; 步骤c、开辟专用的搜索线程,在指定路径中遍历所有文件,获取相应的音频数据,获取所述音频数据的属性信息中的名称信息,并作为相关信息进行记录,如果没有名称信息,则将文件名作为相关信息进行记录,并在当前游戏界面中显示所述音频数据的相关信息; 步骤d、接收用户的选择指令和操作指令; 步骤e、针对用户选择的音频数据,调用所述计算机游戏中相应的内部模块完成相应的操作。 1, a computer game in the method of processing audio data, characterized by comprising the steps of: a, a computer running the game; Step B, obtaining the desired path to the local client audio data; step C, open-dedicated search thread, traversing all the files in the specified path, to obtain the corresponding audio data, name information acquiring the attribute information of the audio data, and recorded as information, if there is no name information, the file name as relevant information is recorded, and display information about the audio data in the current game interface; step d, and receiving a user's selection instruction operation instruction; step E, for the audio data selected by a user, a computer game calling the corresponding internal module to complete the operation corresponding to .
  2. 2、 如权利要求1所述的方法,其特征在于,当用户的操作指令为播放指令时,所述步骤e进一步包括:停止当前正在播放的游戏背景音频数据; 以相同的播;改配置信息,播放用户所选的音频数据。 2. The method as claimed in claim 1, wherein, when the user's operation instruction to playback instruction, said step e further comprises: stop playing the background audio data currently being played; the same multicast; change configuration information playing user selected audio data.
  3. 3、 如权利要求1或2所述的方法,其特征在于,当用户的操作指令为将该音频数据传输至另一游戏客户端时,所述步骤e进一步包括:针对用户指定的另一游戏客户端,从服务器获取相应的IP地址信息; 在本地游戏客户端和对方游戏客户端之间,建立P2P的通信连接; 将用户所选的音频数据传送至对方游戏客户端,并保存至指定路径。 3. A method as claimed in claim 1 or claim 2, wherein, when the user's operation instruction is transmitted to the audio data of a game client, said step e further comprises: another game for a user specified the client acquires the corresponding IP address information from the server; between the local client and the other game game client, establish a P2P communication connection; the user-selected audio data to the other game client and saved to the specified path .
  4. 4、 如权利要求l所述的方法,其特征在于,还包括: 接收用户针对特定音频数据的不再搜索指令,则在下一次音频数据的获取中,该音频数据不再被加入。 4. A method according to claim l, characterized in that, further comprising: receiving a search instruction for a particular user is no longer audio data, acquired in the next audio data, the audio data is no longer added.
  5. 5、 一种计算机游戏中处理音频数据的装置,其特征在于,设置在计算机游戏系统中,该装置包括:路径获取模块,用于获取本地客户端中所需音频数据的路径; 音频数据获取模块,用于开辟专用的搜索线程,在指定路径中遍历所有文件,获取相应的音频数据,获取所述音频数据的属性信息中的名称信息,并作为相关信息进行记录,如果没有名称信息,则将文件名作为相关信息进行记录,并在当前游戏界面中显示所述音频数据的相关信息;指令接收模块,用于接收用户的选捧指令和操作指令;音频数据处理模块,用于针对用户选择的音频数据,调用所述计算机游戏中相应的内部才莫块完成相应的操作。 5, an audio data processing in a computer game, characterized in that, provided in a computer game system, the apparatus comprising: a path obtaining means for obtaining a desired path of the local client audio data; audio data acquisition module , dedicated search for open thread through all files in the specified path, to obtain the corresponding audio data, name information acquiring the attribute information of the audio data, and recorded as information, if there is no name information, the file name as relevant information is recorded, and display related information of the audio data in the current game interface; an instruction receiving module, for selecting and receiving a user's instruction holding operation instruction; audio data processing module, configured for a user-selected audio data corresponding to the internal call a computer game Mo was complete block corresponding operation.
  6. 6、 如权利要求5所述的装置,其特征在于,当用户的操作指令为播放指令时,所述音频数据处理模块进一步包括:停止子模块,用于停止当前正在播放的游戏背景音频数据; 调用子模块,用于调用计算机游戏系统中的原音频播放模块,以相同的播放配置信息,播放用户所选的音频数据。 6. The apparatus as claimed in claim 5, wherein, when the user's operation instruction is an instruction during playback, the audio data processing module further comprises: sub-module stop, for stopping the game background audio data currently being played; sub-module call, calling for a computer game system module original audio playback, playback configuration information is the same, the user selected audio data playback.
  7. 7、 如权利要求5或6所述的装置,其特征在于,当用户的操作指令为将该音频数据传输至另一游戏客户端时,所述音频数据处理模块进一步包括:玩家指定子模块,用于指定音频数据传输的对方游戏客户端; 地址获取子模块,用于针对用户指定的另一游戏客户端,从服务器获取相应的IP地址信息;通信模块,用于在本地游戏客户端和对方游戏客户端之间,建立P2P的通信连接;以及,将用户所选的音频数据传送至对方游戏客户端,并保存至指定路径。 7. The apparatus as claimed in claim 5 or claim 6, wherein, when the user's operation instruction is transmitted to the audio data of a game client, the audio data processing module further comprises: a player to specify sub-module, audio data for specifying the counterpart game client; address acquisition sub-module, configured for the user to specify the other game client, acquires the corresponding IP address information from the server; a communication module for local game client and other between game client, establish a P2P communication connection; and the user-selected audio data to the other game client and saved to the specified path.
  8. 8、 如权利要求5所述的装置,其特征在于,音频数据获取模块进一步包括:搜索子模块,用于开辟专用的搜索线程;以及,在指定路径中遍历所有文件,获取相应的音频数据;相关信息获取子模块,用于获取所述音频数据的属性信息中的名称信息, 并作为相关信息进行记录;如果没有名称信息,则将文件名作为相关信息进行记录;显示子模块,用于在当前游戏界面中显示所述音频数据的相关信息。 8. The apparatus as claimed in claim 5, characterized in that the audio data acquisition module further comprises: a search sub-module, configured to open a dedicated search threads; and, through all files in the specified path, to obtain the corresponding audio data; related information obtaining sub-module, configured to obtain information of the name of the attribute information of audio data, and recorded as related information; name if there is no information, the file name as relevant information is recorded; display sub-module, configured to the current display information of the audio data in the game interface.
  9. 9、 一种计算机游戏系统,其特征在于,包括: 计算机游戏模块,用于提供具有音频播放功能的计算机游戏本身; 路径获取模块,用于获取本地客户端中所需音频数据的路径; 音频数据获取模块,用于开辟专用的搜索线程,在指定路径中遍历所有文件,获取相应的音频数据,获取所述音频数据的属性信息中的名称信息,并作为相关信息进行记录,如果没有名称信息,则将文件名作为相关信息进行记录,并在当前游戏界面中显示所述音频数据的相关信息;指令接收模块,用于接收用户的选择指令和操作指令;音频数据处理模块,用于针对用户选择的音频数据,调用相应模块完成相应的操作。 9, a computer game system comprising: a computer game module, for providing an audio playback computer game itself; path acquiring module, for acquiring the desired path to the local client audio data; audio data obtaining module, configured to open a dedicated search thread through all files in the specified path, to obtain the corresponding audio data, name information acquired attribute information of the audio data and related information as recorded, if there is no name information, then the file name as relevant information is recorded, and display related information of the audio data in the current game interface; an instruction receiving module, for receiving a user's selection instruction and the operation instruction; audio data processing module for the user to select for audio data, call the appropriate module to complete the corresponding operation.
CN 200710120272 2007-08-14 2007-08-14 Method and system for processing audio data in computer game CN100578516C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200710120272 CN100578516C (en) 2007-08-14 2007-08-14 Method and system for processing audio data in computer game

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200710120272 CN100578516C (en) 2007-08-14 2007-08-14 Method and system for processing audio data in computer game

Publications (2)

Publication Number Publication Date
CN101105823A true CN101105823A (en) 2008-01-16
CN100578516C true CN100578516C (en) 2010-01-06

Family

ID=38999712

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200710120272 CN100578516C (en) 2007-08-14 2007-08-14 Method and system for processing audio data in computer game

Country Status (1)

Country Link
CN (1) CN100578516C (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541900A (en) * 2010-12-24 2012-07-04 无锡华润上华半导体有限公司 Optical proximity correction data query method and optical proximity correction data query system
CN104536734B (en) * 2014-12-12 2018-01-02 珠海金山网络游戏科技有限公司 A universal game sound management system and method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1310370A (en) 2000-02-21 2001-08-29 徐文焕 Toy apparatus capable of unloading data
CN1366233A (en) 2001-01-19 2002-08-28 索尼电脑娱乐公司 Sound control method and apparatus for appearing in situ feeling of game

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1310370A (en) 2000-02-21 2001-08-29 徐文焕 Toy apparatus capable of unloading data
CN1366233A (en) 2001-01-19 2002-08-28 索尼电脑娱乐公司 Sound control method and apparatus for appearing in situ feeling of game

Also Published As

Publication number Publication date Type
CN101105823A (en) 2008-01-16 application

Similar Documents

Publication Publication Date Title
Kreitz et al. Spotify--large scale, low latency, P2P music-on-demand streaming
US20060179153A1 (en) Streaming based contents distribution network system and methods for splitting, merging and retrieving files
US20090222520A1 (en) Synchronizing multiple user remote content playback
US7426537B2 (en) Systems and methods for sharing dynamic content among a plurality of online co-users
US20030212804A1 (en) Method and apparatus for media clip sharing over a network
US7701882B2 (en) Systems and methods for collaborative communication
US8046453B2 (en) Illustration supported P2P media content streaming
US20090125934A1 (en) User rating mechanism for media content
US20050283731A1 (en) Remote audio
US7636705B2 (en) Method and apparatus for supporting mobility of content bookmark
Shen et al. Peer-to-peer media streaming: Insights and new developments
US20070147351A1 (en) Methods and apparatus for integrating media across a wide area network
US7107045B1 (en) Method and system for distribution of media
US20120079606A1 (en) Rights and capability-inclusive content selection and delivery
US20120079276A1 (en) Content selection and delivery for random devices
US20090249222A1 (en) System and method for simultaneous media presentation
US20120078997A1 (en) Resuming content across devices and formats
US20080005353A1 (en) Enabling a plurality of devices to control each other
US20060195545A1 (en) Information processing apparatus and content information processing method
US20080071907A1 (en) Methods and apparatus for data transfer
US20040002920A1 (en) Managing and sharing identities on a network
US20050108320A1 (en) Method and apparatus for assisting with playback of remotely stored media files
US20050034164A1 (en) Network AV system
US7519667B1 (en) Method and system for integrating instant messaging, streaming audio and audio playback
US20060200534A1 (en) Multi-medium information sharing system

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C14 Grant of patent or utility model