CN109344284B - Song file playing method, device, equipment and storage medium - Google Patents
Song file playing method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN109344284B CN109344284B CN201811064011.0A CN201811064011A CN109344284B CN 109344284 B CN109344284 B CN 109344284B CN 201811064011 A CN201811064011 A CN 201811064011A CN 109344284 B CN109344284 B CN 109344284B
- Authority
- CN
- China
- Prior art keywords
- song
- volume
- song file
- playing
- file
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/16—Sound input; Sound output
- G06F3/165—Management of the audio stream, e.g. setting of volume, audio stream path
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Circuit For Audible Band Transducer (AREA)
- Reverberation, Karaoke And Other Acoustics (AREA)
Abstract
The invention discloses a method, a device, equipment and a storage medium for playing song files, and belongs to the technical field of computers. The method comprises the following steps: for any original song file to be played in the play list, acquiring the play volume of the original song file; if the playing volume of the original song file is not within the standard volume range, searching a first song file with the playing volume within the standard volume range in the song library, replacing the original song file with the first song file, and playing the first song file; if the first song file does not exist in the song library, searching a second song file with playing volume meeting the playing volume condition in the song library, replacing the original song file with the second song file, and playing the second song file. The method plays the song files, so that the playing volume difference of the played song files is small, and the playing effect is good.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for playing a song file.
Background
With the development of scientific technology, more and more application programs are applied to the lives of people. The song playing application program is a common application program, through which song files can be obtained from a song library to form a play list, and how to play the song files in the play list is a key for improving the playing effect.
Because the playing volumes of the song files in the song library are generally not completely consistent, the playing volumes of two adjacent played song files have a large difference in the process of playing the song files in the playlist. At present, the related art obtains a volume value of a playing terminal and a proper playing volume value of each song file in a playing list, selects a proper playing volume value matched with the volume value of the playing terminal, and plays only the song file corresponding to the proper playing volume value in the playing list.
The inventors found that the related art has at least the following problems:
the song file is played according to the method, only the song file which is suitable for playing the song file with the volume value matched with the volume value of the playing terminal in the playing list can be played, and the method has large limitation and poor playing effect.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a storage medium for playing song files, and aims to solve the problems of high limitation and poor playing effect of playing song files in the related art. The technical scheme is as follows:
in one aspect, a method for playing a song file is provided, where the method includes:
for any original song file to be played in a play list, acquiring the playing volume of the original song file;
if the playing volume of the original song file is not within the standard volume range, searching a first song file with the playing volume within the standard volume range in a song library, replacing the original song file with the first song file, and playing the first song file;
if the first song file with the playing volume within the standard volume range does not exist in the song library, searching a second song file with the playing volume meeting the playing volume condition in the song library, replacing the original song file with the second song file, and playing the second song file.
Optionally, the searching for the second song file with the playback volume meeting the playback volume condition in the song library includes: playing song files with the volume within a first volume range in the song library, and taking the song file with the minimum difference with the lower limit boundary value of the standard volume range as a second song file;
wherein an upper limit boundary value of the first volume range is not greater than a lower limit boundary value of the standard volume range.
Optionally, the searching for the second song file with the playback volume meeting the playback volume condition in the song library further includes: if the song file with the playing volume within the first volume range does not exist in the song library, carrying out volume amplification on the song file with the playing volume within the second volume range in the song library, and taking the song file with the maximum volume in the amplified song files as a second song file;
wherein an upper limit boundary value of the second volume range is not greater than a lower limit boundary value of the first volume range.
Optionally, the searching for the second song file with the playback volume meeting the playback volume condition in the song library further includes: if the song library does not have the song file with the playing volume within the second volume range, taking the song file with the minimum difference with the upper limit boundary value of the standard volume range as a second song file in the song files with the playing volume within the third volume range in the song library;
wherein a lower limit boundary value of the third volume range is not less than an upper limit boundary value of the standard volume range.
Optionally, the standard volume range has a value of [ -6.5, -4] in units of Loudness of LKFS (K-weighted, relative to full scale, K-weighted).
Optionally, the first volume range has a value of [ -10, -6.5) in LKFS.
Optionally, the second volume range has a value (— infinity, -10) in LKFS.
Optionally, the third volume range has a value of (-4, + ∞) in LKFS.
In one aspect, an apparatus for playing a song file is provided, the apparatus comprising:
the acquisition module is used for acquiring the playing volume of any original song file to be played in the playlist;
the first searching module is used for searching a first song file with the playing volume within the standard volume range in the song library if the playing volume of the original song file is not within the standard volume range;
the first playing module is used for replacing the original song file with the first song file and playing the first song file;
the second searching module is used for searching a second song file with the playing volume meeting the playing volume condition in the music library if the first song file with the playing volume within the standard volume range does not exist in the music library;
and the second playing module is used for replacing the original song file with the second song file and playing the second song file.
In one aspect, a song file playing device is provided, the device including: a memory and a processor; the memory is used for storing at least one instruction, and the at least one instruction is loaded and executed by the processor to realize the song file playing method.
In one aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, and the instruction is loaded and executed by a processor to perform the method for playing a song file as described in any one of the above.
The technical scheme provided by the embodiment of the invention has the beneficial effects that at least:
for any original song file to be played in the play list, if the play volume of the original song file is not within the standard volume range, searching a first song file with the play volume within the standard volume range in the song library, replacing the original song file with the first song file, and playing the first song file, so that the song file is preferentially played according to the standard volume, and the play effect of the song file is ensured.
And aiming at the condition that the song library does not have the first song file, searching a second song file with playing volume meeting the playing volume condition in the song library, replacing the original song file with the second song file, and playing the second song file to ensure the playing effect.
In addition, the processing is carried out on any song file to be played through the method, so that the playing volume difference of the played song file is small, and the playing effect is good.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the invention;
fig. 2 is a flowchart of a method for playing a song file according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for a song file playing method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus for a song file playing method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
With the development of science and technology, more and more application programs are applied to the life of people, a song playing application program is a common application program, any number of song files can be obtained from a song library through the application program to form a play list, and the play list is played, so that the song files in the play list can be listened to.
The embodiment of the invention provides a method for playing a song file, which can be applied to the implementation environment shown in fig. 1. In fig. 1, at least one terminal 11 and a server 12 are included, and the terminal 11 may be communicatively connected to the server 12 to download song files from the server 12.
The terminal 11 may be any electronic product that can perform human-Computer interaction with a user through one or more modes such as a keyboard, a touch pad, a touch screen, a remote controller, voice interaction, or handwriting equipment, for example, a PC (Personal Computer), a mobile phone, a smart phone, a PDA (Personal Digital Assistant), a wearable device, a pocket PC (pocket PC), a tablet Computer, a smart car, a smart television, a smart sound box, and the like.
The server 12 may be a server, a server cluster composed of a plurality of servers, or a cloud computing service center.
It should be understood by those skilled in the art that the above-mentioned terminal 11 and server 12 are only examples, and other existing or future terminals or servers may be suitable for the present application and are included within the scope of the present application and are herein incorporated by reference.
Based on the implementation environment shown in fig. 1, referring to fig. 2, an embodiment of the present invention provides a method for playing a song file, where the method is applicable to the terminal shown in fig. 1. As shown in fig. 2, the method includes:
For this step, the playback volume of the song file can be calculated using the algorithm set forth in "algorithm for measuring loudness of audio program and true peak audio level" with ITU-R bs.1770-2, wherein the algorithm includes, but is not limited to, the following steps:
step 1, calculating song files through a K frequency weighting filter;
step 2, dividing the song file into time blocks with the duration not less than a preset duration (for example, 400 milliseconds), mutually overlapping the time blocks with a preset size (for example, 75%), and calculating the mean square energy value of each sound channel in each time block;
step 3, according to the difference of the sound channels, carrying out weighted summation on the mean square energy value of each sound channel to obtain the instant volume of each time block;
step 4, discarding the time block with the immediate volume lower than the absolute threshold (for example, the Loudness of the K-weighted relative full scale value with the absolute threshold of-70 LKFS);
step 5, calculating a relative threshold value of each time block, discarding the time block with the instant volume lower than the relative threshold value, wherein the relative threshold value is the playing volume of the song file with the discarded instant volume lower than the absolute threshold value minus a preset value, and the preset value can be 10;
and 6, after time blocks with the instant volume lower than a relative threshold value or an absolute threshold value are calculated and abandoned, the playing volume of the song file is obtained.
It should be noted that the smaller the numerical value of the playing volume calculated by the algorithm is, the smaller the playing volume of the song file is represented; the larger the numerical value of the playing volume is, the larger the playing volume of the song file is; for any song file, the playing volume of the song file is generally in a fluctuation state, and for the convenience of implementation, the embodiment of the invention measures the playing volume of any song file to be a fixed value capable of reflecting the actual playing volume according to the calculation result. In addition, besides the above manner, the playing volume may be set by the uploading user when the song file is uploaded, and the set playing volume may be directly obtained in view of such a situation.
In addition, the playlist is composed of any number of song files in the song library, and the song files in any number may be song files which are added by the user at the playing terminal, or song files which are randomly recommended to the playing terminal by the application program.
The embodiment of the invention can calculate the playing volume of each song file in the playing list after the playing list is obtained, and when any song file in the playing list is played, the playing volume of the song file can be directly obtained; optionally, in the embodiment of the present invention, after the playlist is obtained, the playing volume of each song file in the playlist is not calculated immediately, but when any song file in the playlist is played, the playing volume of the played song file is calculated in real time, so as to obtain the playing volume of the song file.
Wherein the standard volume range is a volume reference range satisfying the user's auditory perception, and the standard volume range is determined as follows: and playing song files with different volume ranges to a plurality of tested persons to obtain a volume range sample with the most comfortable subjective listening feeling of each tested person, counting the samples, and determining the volume range with the highest overlapping degree of the samples as a standard volume range.
Of course, besides the way of determining the standard volume range through the statistical way, the method provided by the embodiment of the invention can also support user setting so as to meet the personalized requirements of different users. For example, the user a sets the standard volume range to [ -7, -5.5], and the user B sets the standard volume range to [ -6, -4 ]. According to the mode set by the user, a setting entry of a standard volume range can be provided on the song playing interface, so that when the entry is detected to be triggered, a plurality of selectable volume ranges are provided, and the volume range selected by the user is used as the standard volume range; or when the entrance is detected to be triggered, providing a volume value input box, and inputting a standard volume range by a user.
No matter which way is adopted to obtain the standard volume range, since the playing volume of the song file is in the standard volume range and meets the playing requirement of the user on the song file, the method provided by the embodiment of the invention preferentially plays the song file with the playing volume in the standard volume range when playing the song file. Therefore, if the playing volume of the original song file is within the standard volume range, the original song file can be directly played without searching in the song library.
Alternatively, the volume range [ -6.5, -4] may be used as the standard volume range.
Further, when one song file exists in the song library, the alternative song file which is only different from the original song file in playing volume exists at the same time, so that when the playing volume of the original song file is too large or too small, the alternative song file with proper playing volume can be replaced by the original song file, and the alternative song file is played, so that the playing effect is improved, and the user experience is improved.
The above alternative song file is also referred to as a song file with "same fingerprint" as the original song file because the file identifier of the above alternative song file is consistent with that of the original song file. Therefore, in the searching process, the alternative song file can be identified in the song library through the file identification, the playing volume of the alternative song file is further acquired, and the first song file with the playing volume within the standard volume range is searched according to the playing volume of the alternative song file.
For example, if an alternative song file a with a playback volume of-5, an alternative song file B with a playback volume of-8.1, and an alternative song file C with a playback volume of-11 are found, the alternative song file a with a playback volume of-5, which is within the standard volume range of [ -6.5, -4], is used as the first song file.
As described above, only for the case where the first song file with the playing volume within the standard volume range is found, for the alternative song file with the same fingerprint as the original song file which is not stored in the song library, or the alternative song file with the playing volume within the standard volume range does not exist in the stored alternative song file, the method provided by the embodiment of the present invention further includes the subsequent steps so as to be able to successfully play the song files in the playlist.
The playback volume condition may be that the playback volume is within a volume reference range determined by scientific statistics, or that the playback volume is within a volume reference range determined by user settings, as in the standard volume range.
For the way of searching for the second song file, the method provided by the embodiment of the present invention includes, but is not limited to, the following cases:
in the first case: playing song files with the volume within a first volume range in a song library, and taking the song file with the minimum difference with the lower limit boundary value of the standard volume range as a second song file;
wherein, the upper limit boundary value of the first volume range is not more than the lower limit boundary value of the standard volume range.
Optionally [ -10, -6.5) is taken as the first volume range.
If the second song file exists in the song files with the playing volume within the first volume range in the song library, replacing the original song file with the second song file, and playing the second song file;
in the second case: if the second song file does not exist in the song files with the playing volume within the first volume range in the song library, carrying out volume amplification on the song files with the playing volume within the second volume range in the song library, and taking the song file with the maximum volume in the amplified song files as the second song file;
wherein the upper limit boundary value of the second volume range is not greater than the lower limit boundary value of the first volume range.
Optionally, (- ∞, -10) is taken as the second volume range.
It should be noted that, when the volume of the song file is amplified, each sampling point of the song file is amplified in equal proportion. The volume of each sampling point is different, and when the volume of a certain sampling point is amplified to the maximum volume value, the volume amplification of the song file cannot be continuously carried out. According to the principle, for the song files with the playing volume within the second volume range, the song file with the largest playing volume before the volume amplification is carried out, and the playing volume is not necessarily the largest after the volume amplification is carried out, so that the embodiment of the invention firstly carries out the volume amplification on all the song files with the playing volume within the second volume range, and then takes the song file with the largest volume in the amplified song files as the second song file so as to ensure the playing effect.
If the song library has the song file with the playing volume within a second volume range, the volume of the song file is amplified, the song file with the maximum volume in the amplified song files is used as a second song file, and the second song file is played;
in the third case: if the song file with the playing volume within the second volume range does not exist in the song library, taking the song file with the smallest difference with the upper limit boundary value of the standard volume range as a second song file in the song files with the playing volume within the third volume range;
and the lower limit boundary value of the third volume range is not less than the upper limit boundary value of the standard volume range.
Alternatively, (-4, + ∞) is taken as the third volume range.
In this embodiment, the third volume range covers all the remaining volume ranges outside the standard volume range, the first volume range, and the second volume range, and therefore, on the premise that there is no song file whose playback volume is within the standard volume range, the first volume range, and the second volume range in the song library, the existing second song file is searched for within the third volume range.
Next, for convenience of understanding, the method for playing a song file according to the present invention will be described by taking, as an example, a standard sound volume range of [ -6.5, -4], a first sound volume range of [ -10, -6.5), a second sound volume range of (— ∞, -10), and a third sound volume range of (-4, + ∞):
if the playing volume of the original song file is in the range of-6.5-4, the song file is directly played.
If the playing volume of the original song file is not in the range of [ -6.5, -4], searching a first song file with the playing volume of [ -6.5, -4] in the song library:
and if a first song file with the playing volume of [ -6.5, -4] exists in the song library, replacing the first song file with the original song file, and playing the first song file.
If there is no first song file with playing volume in [ -6.5, -4] in the song library, the case that the playing volume of the original song file is in different volume ranges is respectively listed and explained:
if the playing volume of the original song file is between-10 and-6.5), playing the song file with the playing volume between-10 and-6.5 in the song library as a second song file, replacing the original song file with the second song file, and playing the second song file;
and if the original song file is the song file with the smallest difference value between the playing volume and-6.5 in all the song files with the playing volume of-10 to-6.5 in the song library, taking the original song file as a second song file and playing the second song file.
If the playing volume of the original song file is within (-infinity, -10), the song file with the playing volume within-10, -6.5 is firstly searched in the song library:
if the song library has the song files with the playing volume of-10, -6.5), taking the song file with the smallest difference value between the playing volume and-6.5 in the song files as a second song file, replacing the original song file with the second song file, and playing the second song file;
and if the song file with the playing volume of-10, -6.5 does not exist in the song library, amplifying the volume of the song file with the playing volume of (-infinity, -10) in the song library, taking the song file with the maximum volume in the amplified song files as a second song file, replacing the original song file with the second song file, and playing the second song file.
If the playing volume of the original song file is within (-4, + ∞), the song file with the playing volume within [ -10, -6.5) is firstly searched in the song library:
if the song library has the song files with the playing volume of-10, -6.5), taking the song file with the smallest difference value between the playing volume and-6.5 in the song files as a second song file, replacing the original song file with the second song file, and playing the second song file;
if there is no song file with playback volume [ -10, -6.5) in the library, then next find the song file with playback volume (— ∞, -10) in the library:
if the song library has the song file with the playing volume within (-infinity, -10), amplifying the volume of the song file, taking the song file with the maximum volume in the amplified song files as a second song file, replacing the original song file with the second song file, and playing the second song file;
if the song file with the playing volume within (-infinity, -10) does not exist in the song library, playing the song file with the playing volume within (-4, + ∞) in the song library, taking the song file with the smallest difference between the playing volume and-4 as a second song file, replacing the original song file with the second song file, and playing the second song file;
and if the original song file is the song file with the smallest difference value between the playing volume and-4 in all the song files with the playing volume of (-4, + ∞) in the song library, taking the original song file as a second song file and playing the second song file.
In summary, in the method provided by the embodiment of the present invention, for any original song file to be played in the playlist, if the playing volume of the original song file is not within the standard volume range, the first song file with the playing volume within the standard volume range is searched in the song library, the original song file is replaced with the first song file, and the first song file is played, so that the song file is preferentially played according to the standard volume, and the playing effect of the song file is ensured.
And aiming at the condition that the song library does not have the first song file, searching a second song file with playing volume meeting the playing volume condition in the song library, replacing the original song file with the second song file, and playing the second song file to ensure the playing effect.
When a second song file with the playing volume meeting the playing volume condition is searched from the song library, the playing volume outside the standard volume range is further divided into ranges according to the listening comfort degree to form at least one other volume range, and the other volume ranges are sequentially searched according to the descending order of the listening comfort degree, so that the searched playing volume of the second song file is close to the standard volume range, and the playing effect is further improved.
In conclusion, the above processing is performed on any song file to be played by the above method, so that the playing volume difference of the played song file is small, and the playing effect is good.
Based on the same inventive concept, an embodiment of the present invention provides an apparatus for playing a song file, referring to fig. 3, the apparatus including:
an obtaining module 301, configured to obtain a playing volume of any original song file to be played in a playlist;
a first searching module 302, configured to search, in a music library, a first song file with a playing volume within a standard volume range if the playing volume of an original song file is not within the standard volume range;
the first playing module 303 is configured to replace the original song file with the first song file and play the first song file;
a second searching module 304, configured to search, if there is no first song file with a playback volume within a standard volume range in the song library, a second song file with a playback volume that meets a playback volume condition in the song library;
and a second playing module 305, configured to replace the original song file with a second song file and play the second song file.
In an optional implementation manner, the second searching module 304 is configured to, in a song library, play a song file with a volume within a first volume range, and use the song file with the smallest difference from a lower boundary value of a standard volume range as a second song file;
wherein, the upper limit boundary value of the first volume range is not more than the lower limit boundary value of the standard volume range.
Optionally, referring to fig. 4, the apparatus further comprises: the amplifying module 306 is configured to amplify the volume of a song file with a playing volume within a second volume range in the song library if the song file with the playing volume within the first volume range does not exist in the song library;
the second searching module 304 is further configured to use the song file with the largest volume in the amplified song files as a second song file;
wherein the upper limit boundary value of the second volume range is not greater than the lower limit boundary value of the first volume range.
In an optional implementation manner, the second search module 304 is further configured to, if there is no song file with a playing volume within the second volume range in the song library, regard, as the second song file, a song file with a smallest difference from an upper limit boundary value of the standard volume range among song files with playing volumes within a third volume range in the song library;
and the lower limit boundary value of the third volume range is not less than the upper limit boundary value of the standard volume range.
In summary, in the apparatus provided in the embodiment of the present invention, for any original song file to be played in the playlist, if the playing volume of the original song file is not within the standard volume range, the first song file having the playing volume within the standard volume range is searched in the song library, the original song file is replaced with the first song file, and the first song file is played, so that the song file is preferentially played according to the standard volume, and the playing effect of the song file is ensured.
And aiming at the condition that the song library does not have the first song file, searching a second song file with playing volume meeting the playing volume condition in the song library, replacing the original song file with the second song file, and playing the second song file to ensure the playing effect.
When a second song file with the playing volume meeting the playing volume condition is searched from the song library, the playing volume outside the standard volume range is further divided into ranges according to the listening comfort degree to form at least one other volume range, and the other volume ranges are sequentially searched according to the descending order of the listening comfort degree, so that the searched playing volume of the second song file is close to the standard volume range, and the playing effect is further improved.
In conclusion, the above processing is performed on any song file to be played by the above method, so that the playing volume difference of the played song file is small, and the playing effect is good.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus may be divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
Referring to fig. 5, a schematic structural diagram of a terminal 500 for controlling a sound card to transmit audio according to an embodiment of the present disclosure is shown. The terminal 500 may be a portable mobile terminal such as: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. Terminal 500 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, and the like.
In general, the terminal 500 includes: a processor 501 and a memory 502.
The processor 501 may include one or more processing cores, such as a 4-core processor, a 5-core processor, and so on. The processor 501 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 501 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 501 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, processor 501 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
In some embodiments, the terminal 500 may further optionally include: a peripheral interface 503 and at least one peripheral. The processor 501, memory 502 and peripheral interface 503 may be connected by a bus or signal lines. Each peripheral may be connected to the peripheral interface 503 by a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 504, touch screen display 505, camera 506, audio circuitry 507, positioning components 508, and power supply 509.
The peripheral interface 503 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 501 and the memory 502. In some embodiments, the processor 501, memory 502, and peripheral interface 503 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 501, the memory 502, and the peripheral interface 503 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 504 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 504 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 504 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 504 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 504 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 504 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 505 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 505 is a touch display screen, the display screen 505 also has the ability to capture touch signals on or over the surface of the display screen 505. The touch signal may be input to the processor 501 as a control signal for processing. At this point, the display screen 505 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 505 may be one, providing the front panel of the terminal 500; in other embodiments, the display screens 505 may be at least two, respectively disposed on different surfaces of the terminal 500 or in a folded design; in still other embodiments, the display 505 may be a flexible display disposed on a curved surface or on a folded surface of the terminal 500. Even more, the display screen 505 can be arranged in a non-rectangular irregular figure, i.e. a shaped screen. The Display screen 505 may be made of LCD (liquid crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The camera assembly 506 is used to capture images or video. Optionally, camera assembly 506 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 506 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The positioning component 508 is used to locate the current geographic position of the terminal 500 for navigation or LBS (location based Service). The positioning component 508 may be a positioning component based on the GPS (global positioning System) in the united states, the beidou System in china, the graves System in russia, or the galileo System in the european union.
In some embodiments, terminal 500 also includes one or more sensors 510. The one or more sensors 510 include, but are not limited to: acceleration sensor 511, gyro sensor 512, pressure sensor 513, fingerprint sensor 514, optical sensor 515, and proximity sensor 516.
The acceleration sensor 510 may detect the magnitude of acceleration on three coordinate axes of a coordinate system established with the terminal 500. For example, the acceleration sensor 511 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 501 may control the touch screen 505 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 511. The acceleration sensor 511 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 512 may detect a body direction and a rotation angle of the terminal 500, and the gyro sensor 512 may cooperate with the acceleration sensor 511 to acquire a 3D motion of the user on the terminal 500. The processor 501 may implement the following functions according to the data collected by the gyro sensor 512: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensor 513 may be disposed on a side bezel of the terminal 500 and/or an underlying layer of the touch display screen 505. When the pressure sensor 513 is disposed on the side frame of the terminal 500, a user's holding signal of the terminal 500 may be detected, and the processor 501 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 513. When the pressure sensor 513 is disposed at the lower layer of the touch display screen 505, the processor 501 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 505. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 514 is used for collecting a fingerprint of the user, and the processor 501 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 514, or the fingerprint sensor 514 identifies the identity of the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the processor 501 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 514 may be provided on the front, back, or side of the terminal 500. When a physical button or a vendor Logo is provided on the terminal 500, the fingerprint sensor 514 may be integrated with the physical button or the vendor Logo.
The optical sensor 515 is used to collect the ambient light intensity. In one embodiment, the processor 501 may control the display brightness of the touch display screen 505 based on the ambient light intensity collected by the optical sensor 515. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 505 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 505 is turned down. In another embodiment, processor 501 may also dynamically adjust the shooting parameters of camera head assembly 506 based on the ambient light intensity collected by optical sensor 515.
A proximity sensor 516, also referred to as a distance sensor, is typically disposed on the front panel of the terminal 500. The proximity sensor 516 is used to collect the distance between the user and the front surface of the terminal 500. In one embodiment, when the proximity sensor 516 detects that the distance between the user and the front surface of the terminal 500 gradually decreases, the processor 501 controls the touch display screen 505 to switch from the bright screen state to the dark screen state; when the proximity sensor 516 detects that the distance between the user and the front surface of the terminal 500 becomes gradually larger, the processor 501 controls the touch display screen 505 to switch from the screen-rest state to the screen-on state.
Those skilled in the art will appreciate that the configuration shown in fig. 5 is not intended to be limiting of terminal 500 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
Based on the same inventive concept, the embodiment of the invention provides a song file playing device, which comprises a memory and a processor; the memory is used for storing at least one instruction, and the at least one instruction is loaded and executed by the processor to realize the playing method of any song file.
Based on the same inventive concept, an embodiment of the present invention provides a computer-readable storage medium, where at least one instruction is stored, and the instruction is loaded and executed by a processor to implement any one of the above-mentioned song file playing methods.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present invention and should not be taken as limiting the invention, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (12)
1. A method for playing a song file, the method comprising:
for any original song file to be played in a play list, acquiring the playing volume of the original song file;
if the playing volume of the original song file is not within the standard volume range, searching a first song file with the playing volume within the standard volume range in a song library, replacing the original song file with the first song file, and playing the first song file;
if the first song file with the playing volume within the standard volume range does not exist in the song library, in the song files with the playing volume within the first volume range in the song library, taking the song file with the minimum difference value with the lower limit boundary value of the standard volume range as a second song file, replacing the original song file with the second song file, and playing the second song file;
wherein an upper limit boundary value of the first volume range is not greater than a lower limit boundary value of the standard volume range.
2. The method of claim 1, further comprising:
if the song file with the playing volume within the first volume range does not exist in the song library, carrying out volume amplification on the song file with the playing volume within the second volume range in the song library, and taking the song file with the maximum volume in the amplified song files as a second song file;
wherein an upper limit boundary value of the second volume range is not greater than a lower limit boundary value of the first volume range.
3. The method of claim 2, further comprising:
if the song library does not have the song file with the playing volume within the second volume range, taking the song file with the minimum difference with the upper limit boundary value of the standard volume range as a second song file in the song files with the playing volume within the third volume range in the song library;
wherein a lower limit boundary value of the third volume range is not less than an upper limit boundary value of the standard volume range.
4. A method according to claim 1 or 3, characterized in that the standard volume range has a value of [ -6.5, -4] in K-weighted relative full scale value of loudness LKFS.
5. The method according to claim 1 or 2, characterized in that the first volume range has a value of [ -10, -6.5) in K-weighted loudness LKFS with relatively full scale values.
6. The method of claim 2, wherein the second volume range has a value (— infinity, -10) in K-weighted loudness LKFS relative full scale values.
7. The method of claim 3, wherein the third range of loudness values is (-4, + ∞) in K-weighted relative full scale values of loudness LKFS.
8. An apparatus for playing a song file, the apparatus comprising:
the acquisition module is used for acquiring the playing volume of any original song file to be played in the playlist;
the first searching module is used for searching a first song file with the playing volume within the standard volume range in the song library if the playing volume of the original song file is not within the standard volume range;
the first playing module is used for replacing the original song file with the first song file and playing the first song file;
a second searching module, configured to, if the song library does not have the first song file with the playback volume within the standard volume range, take, as a second song file, a song file with a minimum difference from a lower limit boundary value of the standard volume range among the song files with the playback volume within the first volume range in the song library, where an upper limit boundary value of the first volume range is not greater than the lower limit boundary value of the standard volume range;
and the second playing module is used for replacing the original song file with the second song file and playing the second song file.
9. The apparatus of claim 8, further comprising:
the amplification module is used for amplifying the volume of the song file with the playing volume within a second volume range in the song library if the song file with the playing volume within a first volume range does not exist in the song library;
the second searching module is further used for taking the song file with the largest volume in the amplified song files as a second song file;
wherein an upper limit boundary value of the second volume range is not greater than a lower limit boundary value of the first volume range.
10. The apparatus according to claim 9, wherein the second search module is further configured to, if there is no song file with a playing volume within a second volume range in the song library, regard a song file with a smallest difference from an upper boundary value of the standard volume range as the second song file among song files with a playing volume within a third volume range in the song library;
wherein a lower limit boundary value of the third volume range is not less than an upper limit boundary value of the standard volume range.
11. A song file playback device, comprising a memory and a processor; the memory has stored therein at least one instruction, which is loaded and executed by the processor, to implement a method of playing a song file according to any one of claims 1 to 7.
12. A computer-readable storage medium having stored therein at least one instruction, which is loaded and executed by a processor, to implement a method of playing a song file according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811064011.0A CN109344284B (en) | 2018-09-12 | 2018-09-12 | Song file playing method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811064011.0A CN109344284B (en) | 2018-09-12 | 2018-09-12 | Song file playing method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109344284A CN109344284A (en) | 2019-02-15 |
CN109344284B true CN109344284B (en) | 2020-11-03 |
Family
ID=65304858
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811064011.0A Active CN109344284B (en) | 2018-09-12 | 2018-09-12 | Song file playing method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109344284B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111986696B (en) * | 2020-08-27 | 2023-07-07 | 湖南融视文化创意有限公司 | Method for efficiently processing song volume balance |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105006240A (en) * | 2015-06-12 | 2015-10-28 | 惠州Tcl移动通信有限公司 | Music sound control method and system based on audio playing device |
CN105740393A (en) * | 2016-01-27 | 2016-07-06 | 广东欧珀移动通信有限公司 | Song playing method and apparatus |
CN107800879A (en) * | 2017-10-23 | 2018-03-13 | 努比亚技术有限公司 | A kind of audio regulation method, terminal and computer-readable recording medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9571057B2 (en) * | 2013-03-08 | 2017-02-14 | Fujitsu Limited | Altering audio signals |
-
2018
- 2018-09-12 CN CN201811064011.0A patent/CN109344284B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105006240A (en) * | 2015-06-12 | 2015-10-28 | 惠州Tcl移动通信有限公司 | Music sound control method and system based on audio playing device |
CN105740393A (en) * | 2016-01-27 | 2016-07-06 | 广东欧珀移动通信有限公司 | Song playing method and apparatus |
CN107800879A (en) * | 2017-10-23 | 2018-03-13 | 努比亚技术有限公司 | A kind of audio regulation method, terminal and computer-readable recording medium |
Also Published As
Publication number | Publication date |
---|---|
CN109344284A (en) | 2019-02-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107908929B (en) | Method and device for playing audio data | |
CN111079012A (en) | Live broadcast room recommendation method and device, storage medium and terminal | |
CN108965922B (en) | Video cover generation method and device and storage medium | |
CN111127509B (en) | Target tracking method, apparatus and computer readable storage medium | |
CN109922356B (en) | Video recommendation method and device and computer-readable storage medium | |
CN110769313B (en) | Video processing method and device and storage medium | |
CN111857793B (en) | Training method, device, equipment and storage medium of network model | |
CN111177137B (en) | Method, device, equipment and storage medium for data deduplication | |
CN111027490B (en) | Face attribute identification method and device and storage medium | |
CN110933468A (en) | Playing method, playing device, electronic equipment and medium | |
CN112084811A (en) | Identity information determining method and device and storage medium | |
CN109634688B (en) | Session interface display method, device, terminal and storage medium | |
CN111142838A (en) | Audio playing method and device, computer equipment and storage medium | |
CN109089137B (en) | Stuck detection method and device | |
CN109102811B (en) | Audio fingerprint generation method and device and storage medium | |
CN112269559A (en) | Volume adjustment method and device, electronic equipment and storage medium | |
CN110808021B (en) | Audio playing method, device, terminal and storage medium | |
CN111796990A (en) | Resource display method, device, terminal and storage medium | |
CN110152309B (en) | Voice communication method, device, electronic equipment and storage medium | |
CN112133319B (en) | Audio generation method, device, equipment and storage medium | |
CN110933454B (en) | Method, device, equipment and storage medium for processing live broadcast budding gift | |
CN109344284B (en) | Song file playing method, device, equipment and storage medium | |
CN110992954A (en) | Method, device, equipment and storage medium for voice recognition | |
CN108231091B (en) | Method and device for detecting whether left and right sound channels of audio are consistent | |
CN113592874B (en) | Image display method, device and computer equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |