Audio file playing method and device, and audio equipment

By converting VBR format audio files to CBR format, using the fixed bit rate characteristics of CBR format, the problem of wasted memory resources during VBR format audio files is solved, and more efficient audio file playback is achieved.

CN116230029BActive Publication Date: 2025-04-15SHENZHEN BLUETRUM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310227427.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2025-04-15
Estimated Expiration
2043-02-28

AI Technical Summary

Technical Problem

The prior art requires a large amount of RAM memory when playing VBR format audio files, resulting in wasted memory resources.

Method used

Convert VBR format audio source files into target audio files in CBR format, and use the fixed bit rate characteristics of CBR format files to quickly locate the audio data in the jump position to avoid storing frame index tables.

Benefits of technology

After conversion, there is no need to open up a large amount of RAM memory storage frame index table, saving memory resources, reducing costs, and improving the efficiency of audio file playback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116230029B_ABST
    Figure CN116230029B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of audio playback, and discloses an audio file playback method and device, and an audio device. The method comprises: when playing an audio source file in VBR format, converting the audio source file into a target audio file in CBR format, responding to a jump playback operation, determining target CBR audio data in multiple frames of CBR audio data, the target CBR audio data being CBR audio data corresponding to a jump position of the jump playback operation, and playing the target audio file with the target CBR audio data as the starting playback data. Since the CBR format file uses a fixed bit rate compressed file, the size of each frame of data is the same. When encountering a jump playback situation, this embodiment quickly locates the target CBR audio data through a linear relationship, and there is no need to open up a large RAM memory to store the position information of each frame of data in the CBR format file, thereby avoiding the waste of memory resources and saving costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of audio playback, and in particular to an audio file playback method and device, and audio equipment. Background Art

[0002] VBR (Variable Bit Rate, dynamic bit rate) format audio files use dynamic bit rate compression files. When an audio device plays a VBR format audio file, it needs to open up a large RAM memory to store a frame index table. The frame index table records the frame number of each frame of data in the VBR format audio file. When encountering a jump play situation such as fast forward / fast rewind / drag play, the audio device locates the jump position, and then traverses the frame index table according to the jump position, so as to quickly locate the frame data corresponding to the jump position, and finally plays the frame data corresponding to the jump position. As mentioned above, since the relevant technology needs to store the frame index table, it is necessary to open up a large RAM memory for storage, resulting in a waste of memory resources. Summary of the invention

[0003] The embodiments of the present invention provide an audio file playing method and apparatus, and an audio device, aiming to solve the technical problem that a large amount of RAM memory is consumed when playing VBR format files in the related art.

[0004] In a first aspect, an embodiment of the present invention provides an audio file playing method, comprising:

[0005] When playing an audio source file in a VBR format, converting the audio source file into a target audio file in a CBR format, the target audio file comprising multiple frames of CBR audio data of equal length;

[0006] In response to a jump play operation, determining target CBR audio data in the multiple frames of CBR audio data, the target CBR audio data being CBR audio data corresponding to a jump position of the jump play operation;

[0007] The target audio file is played using the target CBR audio data as the starting playback data.

[0008] Optionally, determining the target CBR audio data in the multiple frames of CBR audio data includes:

[0009] Determine the target frame number corresponding to the jump position;

[0010] Among the multiple frames of CBR audio data, the CBR audio data with the frame number being the target frame number is selected as the target CBR audio data.

[0011] Optionally, determining the target frame number corresponding to the jump position includes:

[0012] Determine the playback time of the jump position on the preset playback time bar;

[0013] The target frame number is calculated according to the playback duration, the preset total number of frames and the preset total duration.

[0014] Optionally, when playing an audio source file in a VBR format, converting the audio source file into a target audio file in a CBR format includes:

[0015] When playing an audio source file in a VBR format, decoding the audio source file to obtain decoded data;

[0016] storing the decoded data in a first storage location of a preset memory;

[0017] According to the CBR compression protocol, the decoded data is converted into a target audio file in a CBR format, and the target audio file is stored in a second storage location of the preset memory.

[0018] Optionally, the audio source file includes multiple frames of VBR audio data, and before decoding the audio source file, the method further includes:

[0019] Cache VBR audio data of a preset number of frames according to the VBR format;

[0020] When playing an audio source file in VBR format, the VBR audio data is played sequentially.

[0021] Optionally, the cache duration corresponding to the preset number of frames is greater than or equal to the transcoding duration, and the transcoding duration is the duration consumed for converting the audio source file into a target audio file in a CBR format.

[0022] Optionally, the audio source file includes multiple frames of VBR audio data, and the method further includes:

[0023] When playing the target audio file, synchronously and sequentially retrieve each frame of VBR audio data in the audio source file;

[0024] Determine starting VBR audio data, wherein the starting VBR audio data is VBR audio data in the audio source file whose frame number is consistent with the frame number of the audio playback data, and the audio playback data is CBR audio data currently in a playback state;

[0025] The target audio file is played using the starting VBR audio data as the starting playback data.

[0026] In a second aspect, an embodiment of the present invention provides an audio file playing device, comprising:

[0027] A format conversion module, used for converting a VBR-formatted audio source file into a CBR-formatted target audio file when playing the VBR-formatted audio source file, wherein the target audio file includes multiple frames of CBR audio data of equal length;

[0028] A data determination module, configured to respond to a jump play operation and determine target CBR audio data in the plurality of frames of CBR audio data, wherein the target CBR audio data is CBR audio data corresponding to a jump position of the jump play operation;

[0029] The audio playing module is used to play the target audio file using the target CBR audio data as the starting playing data.

[0030] Optionally, the data determination module is specifically used to: determine a target frame number corresponding to the jump position, and select CBR audio data with a frame number equal to the target frame number from multiple frames of CBR audio data as target CBR audio data.

[0031] Optionally, the data determination module is specifically used to: determine the playback duration of the jump position on the preset playback duration bar, and calculate the target frame number according to the playback duration, the preset total number of frames and the preset total duration.

[0032] Optionally, when playing an audio source file in VBR format, the format conversion module is specifically used to: when playing an audio source file in VBR format, decode the audio source file to obtain decoded data, store the decoded data in a first storage location of a preset memory, convert the decoded data into a target audio file in CBR format according to a CBR compression protocol, and store the target audio file in a second storage location of the preset memory.

[0033] Optionally, the audio source file includes multiple frames of VBR audio data. Before decoding the audio source file, the audio file playback device also includes an audio cache module, and the audio cache module is used to cache a preset number of frames of VBR audio data according to the VBR format. When playing the audio source file in the VBR format, the VBR audio data is played sequentially.

[0034] Optionally, the cache duration corresponding to the preset number of frames is greater than or equal to the transcoding duration, and the transcoding duration is the duration consumed for converting the audio source file into a target audio file in a CBR format.

[0035] Optionally, the audio source file includes multiple frames of VBR audio data, and the audio file playback device also includes a frame number retrieval module, which is used to synchronously and sequentially retrieve each frame of VBR audio data in the audio source file when playing the target audio file, and determine the starting VBR audio data, the starting VBR audio data is the VBR audio data in the audio source file, whose frame number is consistent with the frame number of the audio playback data, the audio playback data is CBR audio data currently in a playback state, and the target audio file is played with the starting VBR audio data as the starting playback data.

[0036] In a second aspect, an embodiment of the present invention provides a non-volatile readable storage medium storing computer executable instructions, wherein the computer executable instructions are used to enable an audio device to execute the above-mentioned audio file playing method.

[0037] In a third aspect, an embodiment of the present invention provides an audio device, including:

[0038] at least one processor; and,

[0039] a memory communicatively connected to the at least one processor; wherein,

[0040] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned audio file playing method.

[0041] In the audio file playing method provided by the embodiment of the present invention, when playing an audio source file in VBR format, the audio source file is converted into a target audio file in CBR format, the target audio file includes multiple frames of CBR audio data of equal length, and in response to a jump play operation, the target CBR audio data is determined in the multiple frames of CBR audio data, the target CBR audio data is the CBR audio data corresponding to the jump position of the jump play operation, and the target audio file is played with the target CBR audio data as the starting play data. Since the CBR format file uses a fixed bit rate compressed file, the size of each frame of data is the same. When a jump play situation is encountered, this embodiment quickly locates the target CBR audio data through a linear relationship, and there is no need to open up a large RAM memory to store the position information of each frame of data in the CBR format file, thereby avoiding the waste of memory resources and saving costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0043] Figure 1 A flowchart of an audio file playing method provided by an embodiment of the present invention;

[0044] Figure 2 A schematic diagram of the structure of an audio file playing device provided by an embodiment of the present invention;

[0045] Figure 3 A schematic diagram of the circuit structure of an audio device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0047] It should be noted that, if there is no conflict, the various features in the embodiments of the present invention can be combined with each other, all within the scope of protection of the present invention. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order from the module division in the device or the flow chart. Furthermore, the words "first", "second", "third", etc. used in the present invention do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.

[0048] The embodiment of the present invention provides a method for playing an audio file. Figure 1 , the audio file playing method comprises the following steps:

[0049] S11: When playing an audio source file in a VBR format, convert the audio source file into a target audio file in a CBR format, where the target audio file includes multiple frames of CBR audio data of equal length.

[0050] In this step, the VBR format audio source file uses a dynamic bit rate compression file, and the audio source file includes multiple frames of VBR audio data. The size of each frame of VBR audio data can be the same or different. The CBR format target audio file uses a fixed bit rate compression file, and the size of each frame of CBR audio data in the target audio file is the same. For example, the audio source file includes multiple frames of VBR audio data, and the multiple frames of VBR audio data are {v1, v2, v3, ..., v i ,...v n},v iis the i-th frame of VBR audio data. When the present embodiment detects the playback operation of the audio source file, the audio source file is decoded according to the CBR protocol to obtain a target audio file, which includes multiple frames of CBR audio data, and the multiple frames of CBR audio data are {c1, c2, c3, ..., c j ,...c n}, c j is the j-th frame of CBR audio data.

[0051] S12: In response to the jump play operation, target CBR audio data is determined in the multiple frames of CBR audio data, where the target CBR audio data is CBR audio data corresponding to the jump position of the jump play operation.

[0052] In this step, the jump play operation is an operation of jumping to play the audio source file, wherein the jump play operation includes a fast forward operation, a fast rewind operation or a drag operation, wherein the fast forward operation can be an N-fold fast forward operation, and the fast rewind operation can be an N-fold fast rewind operation, wherein N is a positive number greater than the natural number 1. The drag operation is an operation of dragging the play point on the preset play time bar, for example, dragging the play point to the 50th minute. The jump position is the position of the play point after the jump play operation, for example, if the play point at the 30th minute is dragged to the 50th minute, the play point at the 50th minute is the jump position.

[0053] For example, before the jump play operation is input, the play point is at the 30th minute, and the VBR audio data of the audio source file at the 30th minute is the i+1th frame VBR audio data. After the jump play operation is input, the play point is at the 50th minute, and the VBR audio data of the audio source file at the 50th minute is the i+8th frame VBR audio data, but the CBR audio data of the target audio file at the 50th minute is the j+12th frame CBR audio data, so the j+12th frame CBR audio data is the target CBR audio data.

[0054] S13: Play the target audio file using the target CBR audio data as the starting playback data.

[0055] In this step, for example, this embodiment uses the j+12th frame of CBR audio data as the starting playback data, and starts to play the j+12th frame of CBR audio data, the j+13th frame of CBR audio data, the j+14th frame of CBR audio data, etc. in sequence. Since the CBR format file uses a fixed bit rate compression file, the size of each frame of data is the same. When a jump broadcast occurs, this embodiment quickly locates the target CBR audio data through a linear relationship, and there is no need to open up a large RAM memory to store the location information of each frame of data in the CBR format file, thereby avoiding the waste of memory resources. In addition, the price of RAM memory is relatively expensive compared to other types of storage media. This embodiment uses less RAM memory and can also achieve audio playback, which is relatively cost-saving.

[0056] In some embodiments, determining target CBR audio data in multiple frames of CBR audio data comprises the following steps:

[0057] S121: Determine the target frame number corresponding to the jump position.

[0058] S122: Selecting CBR audio data with a frame number equal to a target frame number from among multiple frames of CBR audio data as target CBR audio data.

[0059] In S121, the target frame number is the frame number of the target CBR audio data. Determining the target frame number corresponding to the jump position includes: determining the play time of the jump position on the preset play time bar, and calculating the target frame number according to the play time, the preset total number of frames and the preset total time.

[0060] Determining the playback duration of the jump position on the preset playback duration bar includes: determining a playback time point of the jump position on the preset playback duration bar, and using the playback time point as the playback duration.

[0061] Calculating the target frame number based on the playback duration, the preset total number of frames, and the preset total duration includes: dividing the playback duration by the preset total duration to obtain the duration ratio, and multiplying the duration ratio by the preset total number of frames to obtain the target frame number. For example, the preset total number of frames is n, and the preset total duration is t all , the playback time is t cur , the target frame number is c target , this embodiment calculates the target frame number according to the following formula: target =n*t cur / t all .

[0062] In S122, this embodiment uses the CBR audio data with the target frame number as the target CBR audio data among the multiple frames of CBR audio data.

[0063] In some embodiments, when playing an audio source file in VBR format, converting the audio source file into a target audio file in CBR format includes the following steps: when playing an audio source file in VBR format, decoding the audio source file to obtain decoded data, storing the decoded data in a first storage location of a preset memory, converting the decoded data into a target audio file in CBR format according to a CBR compression protocol, and storing the target audio file in a second storage location of the preset memory. The preset memory is a flash memory.

[0064] In some embodiments, before decoding the audio source file, the audio file playing method further comprises the following steps: caching VBR audio data of a preset number of frames according to the VBR format, and when playing the audio source file in the VBR format, playing the VBR audio data in sequence. This embodiment can ensure a quick response to the user's playing operation and normal audio playback by caching the VBR audio data of a preset number of frames.

[0065] In some embodiments, the cache duration corresponding to the preset number of frames is greater than or equal to the transcoding duration, and the transcoding duration is the time consumed for converting the audio source file into a target audio file in CBR format. When the user performs a jump playback operation within the cache duration, this embodiment can quickly switch from the audio source file in VBR format to the target audio file in CBR format for playback, avoiding delays and pauses, which is beneficial to improving the smoothness of audio playback.

[0066] In some embodiments, the audio source file includes multiple frames of VBR audio data, and the audio file playing method further includes the following steps:

[0067] S14: When playing the target audio file, synchronously and sequentially retrieve each frame of VBR audio data in the audio source file.

[0068] S15: Determine the starting VBR audio data, where the starting VBR audio data is the VBR audio data in the audio source file, whose frame number is consistent with the frame number of the audio playback data, and the audio playback data is the CBR audio data currently in the playback state.

[0069] S16: Play the target audio file using the initial VBR audio data as the initial playback data.

[0070] After playing the target CBR audio data, this embodiment switches from the target audio file in CBR format to the audio source file in VBR format. This can not only meet the demand for accurate positioning of the playback point required for the jump playback operation, but also meet the demand for continuing to maintain the original playback sound quality of the audio source file.

[0071] In S14, S15 and S16, as mentioned above, the file format of the audio source file is VBR format, and the audio device traverses the audio source file frame by frame. The specific process is as follows:

[0072] A11: Assign i=0.

[0073] A12: Determine the CBR audio data currently being played, and set the CBR audio data currently being played to be the k-th frame of CBR audio data.

[0074] A12: Determine whether the frame number of the i-th frame VBR audio data is consistent with the frame number of the k-th frame CBR audio data. If not, execute step A13; if consistent, execute step A14.

[0075] A13: Assign i=i+1, and return to step A12.

[0076] A14: Use the i-th frame of VBR audio data as the starting playback data to play the target audio file.

[0077] It should be noted that, in each of the above-mentioned embodiments, there is not necessarily a certain order between the above-mentioned steps. A person skilled in the art can understand, based on the description of the embodiments of the present invention, that in different embodiments, the above-mentioned steps may have different execution orders, that is, they may be executed in parallel, may be executed interchangeably, and so on.

[0078] As another aspect of the present invention, the present invention provides an audio file playing device, wherein the audio file playing device may be a software module, the software module includes a plurality of instructions, which are stored in a memory, and the processor may access the memory, call the instructions for execution, so as to complete the audio file playing method described in each of the above embodiments.

[0079] In some implementations, the audio file playback device may also be constructed by hardware devices, for example, the audio file playback device may be constructed by one or more chips, and the chips may work in coordination with each other to complete the audio file playback methods described in the above implementations. For another example, the audio file playback device may also be constructed by various logic devices, such as a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machi ne) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components.

[0080] See also Figure 2The audio file playing device 200 includes: a format conversion module 21, a data determination module 22 and an audio playing module 23.

[0081] The format conversion module 21 is used to convert the audio source file in VBR format into a target audio file in CBR format when playing the audio source file in VBR format, and the target audio file includes multiple frames of CBR audio data of equal length. The data determination module 22 is used to respond to the jump play operation and determine the target CBR audio data in the multiple frames of CBR audio data, and the target CBR audio data is the CBR audio data corresponding to the jump position of the jump play operation. The audio playback module 23 is used to play the target audio file with the target CBR audio data as the starting playback data.

[0082] Since the CBR format file uses a fixed bit rate compression file, the size of each frame of data is the same. When a jump broadcast occurs, this embodiment quickly locates the target CBR audio data through a linear relationship, and there is no need to allocate a large RAM memory to store the position information of each frame of data in the CBR format file, thereby avoiding the waste of memory resources and saving costs.

[0083] In some embodiments, the data determination module 22 is specifically used to: determine the target frame number corresponding to the jump position, and select CBR audio data with a frame number equal to the target frame number from multiple frames of CBR audio data as target CBR audio data.

[0084] In some embodiments, the data determination module 22 is specifically used to: determine the playback time of the jump position on the preset playback time bar;

[0085] The target frame number is calculated according to the playback duration, the preset total number of frames and the preset total duration.

[0086] In some embodiments, when playing an audio source file in VBR format, the format conversion module 21 is specifically used to: when playing an audio source file in VBR format, decode the audio source file to obtain decoded data, store the decoded data in a first storage location of a preset memory, convert the decoded data into a target audio file in CBR format according to a CBR compression protocol, and store the target audio file in a second storage location of the preset memory.

[0087] In some embodiments, the audio source file includes multiple frames of VBR audio data. Before decoding the audio source file, please continue to refer to Figure 2 The audio file playing device 200 also includes an audio cache module 24, which is used to cache VBR audio data of a preset number of frames according to the VBR format, and when playing an audio source file in the VBR format, play the VBR audio data in sequence.

[0088] In some embodiments, the cache duration corresponding to the preset number of frames is greater than or equal to the transcoding duration, and the transcoding duration is the duration consumed for converting the audio source file into a target audio file in a CBR format.

[0089] In some embodiments, the audio source file includes multiple frames of VBR audio data. Figure 2 The audio file playing device 200 also includes a frame number retrieval module 25, which is used to synchronously and sequentially retrieve each frame of VBR audio data in the audio source file when playing the target audio file, and determine the starting VBR audio data. The starting VBR audio data is the VBR audio data in the audio source file whose frame number is consistent with the frame number of the audio playing data. The audio playing data is the CBR audio data currently in the playing state, and the target audio file is played with the starting VBR audio data as the starting playing data.

[0090] It should be noted that the above-mentioned audio file playing device can execute the audio file playing method provided in the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in the embodiment of the audio file playing device, please refer to the audio file playing method provided in the embodiment of the present invention.

[0091] See also Figure 3 , Figure 3 Schematic diagram of the circuit structure of an audio device provided by an embodiment of the present invention. Figure 3 As shown, the audio device 300 includes one or more processors 31 and a memory 32. Figure 3 A processor 31 is taken as an example.

[0092] The processor 31 and the memory 32 may be connected via a bus or other means. Figure 3 The example of connecting through bus is taken in the following.

[0093] The memory 32 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the audio file playback method in the embodiment of the present invention. The processor 31 executes various functional applications and data processing of the audio file playback device by running the non-volatile software programs, instructions and modules stored in the memory 32, that is, realizes the audio file playback method provided by the above method embodiment and the functions of each module or unit of the above device embodiment.

[0094] The memory 32 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 32 may optionally include a memory remotely arranged relative to the processor 31, and these remote memories may be connected to the processor 31 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0095] The program instructions / modules are stored in the memory 32, and when executed by the one or more processors 31, the audio file playing method in any of the above method embodiments is executed.

[0096] Since the CBR format file uses a fixed bit rate compression file, the size of each frame of data is the same. When a jump broadcast occurs, this embodiment quickly locates the target CBR audio data through a linear relationship, and there is no need to allocate a large RAM memory to store the position information of each frame of data in the CBR format file, thereby avoiding the waste of memory resources and saving costs.

[0097] An embodiment of the present invention further provides a non-volatile computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are executed by one or more processors, such as Figure 3 A processor 31 in the embodiment may enable the one or more processors to execute the audio file playing method in any of the above method embodiments.

[0098] Since the CBR format file uses a fixed bit rate compression file, the size of each frame of data is the same. When a jump broadcast occurs, this embodiment quickly locates the target CBR audio data through a linear relationship, and there is no need to allocate a large RAM memory to store the position information of each frame of data in the CBR format file, thereby avoiding the waste of memory resources and saving costs.

[0099] An embodiment of the present invention further provides a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by an audio device, the audio device executes any one of the audio file playing methods.

[0100] Since the CBR format file uses a fixed bit rate compression file, the size of each frame of data is the same. When a jump broadcast occurs, this embodiment quickly locates the target CBR audio data through a linear relationship, and there is no need to allocate a large RAM memory to store the position information of each frame of data in the CBR format file, thereby avoiding the waste of memory resources and saving costs.

[0101] The above described device or equipment embodiments are merely illustrative, wherein the unit modules described as separate components may or may not be physically separated, and the components displayed as module units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network module units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0102] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they may still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for playing an audio file, characterized in that: include: When playing an audio source file in a VBR format, converting the audio source file into a target audio file in a CBR format, the target audio file comprising multiple frames of CBR audio data of equal length; In response to a jump play operation, determining target CBR audio data in the multiple frames of CBR audio data, the target CBR audio data being CBR audio data corresponding to a jump position of the jump play operation; The target audio file is played using the target CBR audio data as the starting playback data.

2. The method according to claim 1, characterized in that Determining target CBR audio data in the multiple frames of CBR audio data includes: Determine the target frame number corresponding to the jump position; Among the multiple frames of CBR audio data, the CBR audio data with the frame number being the target frame number is selected as the target CBR audio data.

3. The method according to claim 2, characterized in that Determining the target frame number corresponding to the jump position includes: Determine the playback time of the jump position on the preset playback time bar; The target frame number is calculated according to the playback duration, the preset total number of frames and the preset total duration.

4. The method according to claim 1, characterized in that When playing an audio source file in a VBR format, converting the audio source file into a target audio file in a CBR format includes: When playing an audio source file in a VBR format, decoding the audio source file to obtain decoded data; storing the decoded data in a first storage location of a preset memory; According to the CBR compression protocol, the decoded data is converted into a target audio file in a CBR format, and the target audio file is stored in a second storage location of the preset memory.

5. The method according to claim 4, characterized in that The audio source file includes multiple frames of VBR audio data. Before decoding the audio source file, the method further includes: Cache VBR audio data of a preset number of frames according to the VBR format; When playing an audio source file in VBR format, the VBR audio data is played sequentially.

6. The method according to claim 5, characterized in that The cache duration corresponding to the preset number of frames is greater than or equal to the transcoding duration, and the transcoding duration is the duration consumed for converting the audio source file into a target audio file in a CBR format.

7. The method according to any one of claims 1 to 6, characterized in that: The audio source file includes multiple frames of VBR audio data, and the method further includes: When playing the target audio file, synchronously and sequentially retrieve each frame of VBR audio data in the audio source file; Determine starting VBR audio data, wherein the starting VBR audio data is VBR audio data in the audio source file whose frame number is consistent with the frame number of the audio playback data, and the audio playback data is CBR audio data currently in a playback state; The target audio file is played using the starting VBR audio data as the starting playback data.

8. An audio file playing device, characterized in that: include: A format conversion module, used for converting a VBR-formatted audio source file into a CBR-formatted target audio file when playing the VBR-formatted audio source file, wherein the target audio file includes multiple frames of CBR audio data of equal length; A data determination module, configured to respond to a jump play operation and determine target CBR audio data in the plurality of frames of CBR audio data, wherein the target CBR audio data is CBR audio data corresponding to a jump position of the jump play operation; The audio playing module is used to play the target audio file using the target CBR audio data as the starting playing data.

9. A non-volatile readable storage medium, characterized in that: Computer executable instructions are stored, and the computer executable instructions are used to enable an audio device to execute the audio file playing method according to any one of claims 1 to 7.

10. An audio device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the audio file playing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • High quality, low power, wireless audio system

    CN101147421A

  • Embedded interactive application service transcoding and encoding system

    CN101945285A