CN116560615A - Audio file playing method, playing device, terminal and readable storage medium - Google Patents

Audio file playing method, playing device, terminal and readable storage medium Download PDF

Info

Publication number
CN116560615A
CN116560615A CN202310466620.3A CN202310466620A CN116560615A CN 116560615 A CN116560615 A CN 116560615A CN 202310466620 A CN202310466620 A CN 202310466620A CN 116560615 A CN116560615 A CN 116560615A
Authority
CN
China
Prior art keywords
audio
file
playing
stored
external device
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.)
Pending
Application number
CN202310466620.3A
Other languages
Chinese (zh)
Inventor
郭新新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Streamax Technology Co Ltd
Original Assignee
Streamax Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Streamax Technology Co Ltd filed Critical Streamax Technology Co Ltd
Priority to CN202310466620.3A priority Critical patent/CN116560615A/en
Publication of CN116560615A publication Critical patent/CN116560615A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application belongs to the technical field of vehicle-mounted equipment and mainly provides a playing method, a playing device, a terminal and a readable storage medium of audio files, wherein when detecting external equipment connected with the terminal, the application detects whether audio list files are stored in the external equipment; when the audio list file is not stored in the external equipment, scanning the audio files in the external equipment, and playing any target audio file in the audio files when the target audio file is scanned; when the audio list file is stored in the external device, the audio file stored in the external device is played according to the audio file information carried in the audio list file, so that the audio file can be quickly selected to be played when the external device is accessed to the terminal, the whole-disk scanning of the external device is not needed, the problem that the terminal loads the audio slowly when the external device containing a large number of audio files is used as a song playing source is solved, and the user experience is effectively improved.

Description

Audio file playing method, playing device, terminal and readable storage medium
Technical Field
The application belongs to the technical field of vehicle-mounted equipment, and particularly relates to a playing method, a playing device, a terminal and a readable storage medium of an audio file.
Background
With the continuous development of automobile technology, automobile configuration is higher and higher, and people also use entertainment functions in automobiles more and more, wherein music playing in automobiles is popular.
Currently, when an audio playback apparatus of a vehicle cannot connect to a network, it is generally necessary to use a usb disk to play music. Namely, the USB flash disk with the audio files stored therein is inserted into the vehicle-mounted device, and the vehicle-mounted device plays the audio by loading the audio files in the USB flash disk.
However, in this audio playing mode, when the audio files stored in the usb flash disk are more, the problem of slow audio loading speed is easy to occur.
Disclosure of Invention
The application provides a playing method, a playing device, a terminal and a readable storage medium for audio files, which can solve the problem of low audio loading speed when external devices such as a USB flash disk containing a large number of audio files are adopted as audio playing sources.
An embodiment of the present invention provides a method for playing an audio file, applied to a terminal, where the audio file is stored in an external device connected to the terminal, and the playing method includes:
detecting whether an audio list file corresponding to the audio file is stored in the external device or not when the external device connected with the terminal is detected;
if the audio list file corresponding to the audio file is not stored in the external equipment, scanning the audio file in the external equipment, and playing the target audio file when any one of the audio files is scanned;
and if the audio list file corresponding to the audio file is stored in the external equipment, playing the audio file stored in the external equipment according to the audio file information carried in the audio list file.
The second aspect of the embodiments of the present application further provides a playing device of an audio file, configured in a terminal, where the audio file is stored in an external device connected to the terminal, and the playing device includes:
a detection unit, configured to detect, when detecting the external device connected to the terminal, whether an audio list file corresponding to the audio file is stored in the external device;
a first playing unit, configured to scan the audio files in the external device if the audio list file corresponding to the audio files is not stored in the external device, and play any one target audio file in the audio files when the target audio file is scanned;
and the second playing unit is used for playing the audio files stored in the external equipment according to the audio file information carried in the audio list files if the audio list files corresponding to the audio files are stored in the external equipment.
A third aspect of the embodiments of the present application further provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the computer program is executed by the processor to implement the steps of the method for playing an audio file according to the first aspect.
The fourth aspect of the embodiments of the present application further provides a readable storage medium, where a computer program is stored, where the computer program is executed by a processor to implement the steps of the method for playing an audio file according to the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product, which when run on a terminal, causes the terminal to perform the steps of the method for playing an audio file according to the first aspect.
In the embodiment of the application, when the external device connected with the terminal is detected, whether the external device stores the audio list file corresponding to the audio file or not is detected; when the audio list file corresponding to the audio file is not stored in the external equipment, scanning the audio file in the external equipment, and playing the target audio file when any one target audio file in the audio file is scanned; when the audio list files corresponding to the audio files are stored in the external equipment, the audio files stored in the external equipment are played according to the audio file information carried in the audio list files, so that when the external equipment is accessed to the terminal, the audio files can be quickly selected to be played, full-disc scanning is not needed to be carried out on the external equipment, the problem that when the external equipment containing a large number of audio files is used as a song playing source, the terminal loads audio slowly is solved, user experience is effectively improved, and the effect of plug and play can be achieved for the external equipment.
Drawings
Fig. 1 is a schematic flowchart of a first implementation of a method for playing an audio file according to an embodiment of the present application.
Fig. 2 is a schematic flowchart of a second implementation of a method for playing an audio file according to an embodiment of the present application.
Fig. 3 is a schematic flowchart of a specific implementation of the step 104 of the audio file playing method according to the embodiment of the present application.
Fig. 4 is a schematic flowchart of a specific implementation of the step 103 of the audio file playing method according to the embodiment of the present application.
Fig. 5 is a schematic structural diagram of a playback device for audio files according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
It should be understood that, in this specification and the claims that follow, the term "comprises/comprising" indicates the presence of the stated features, integers, steps, operations, elements, and/or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
Furthermore, the terms first, second and the like in the description and in the claims, are used for distinguishing between the descriptions and not necessarily for indicating or implying relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise.
At present, most of audio playing devices in a car cannot be connected to a network, and many times, a user needs to use a USB flash disk to play music.
The method specifically comprises the steps of firstly storing audio files in a U disk, then inserting the U disk onto vehicle-mounted equipment (namely an external interface of audio playing equipment on a vehicle), and carrying out audio playing by the audio playing equipment of the vehicle through loading the audio playing files in the U disk.
In actual use, people usually directly purchase a USB flash disk specially stored with audio files for vehicle-mounted audio playing, thousands of audio files or even tens of thousands of audio files are generally stored in the USB flash disk, and the audio playing equipment of a vehicle needs to consume a large amount of time and resources to scan the whole disk after recognizing the USB flash disk each time so as to acquire the audio files, so that the audio playing can not be quickly performed after detecting the USB flash disk, the problem of low audio loading speed exists, and the use experience of users is greatly influenced.
In order to solve the above technical problems, embodiments of the present application provide a method for playing an audio file, where the method is applied to a terminal and can be executed by a playing device of the audio file on the terminal.
In this embodiment of the present application, the terminal may be an intelligent terminal that may implement audio playback by loading an audio file in an external device connected to the terminal, such as a vehicle, a desktop computer, or a notebook computer.
The above audio file may be stored in an external device connected to the terminal. The external device may be a storage device such as a usb disk or a magnetic disk.
It should be noted that, the specific types of the above-mentioned intelligent terminal and the external device are not limited in this application, and for convenience of explanation of the technical solution of this application, the above-mentioned terminal is used as a vehicle, and the above-mentioned external device is used as a usb disk for illustration.
Referring to fig. 1, the method for playing an audio file in the embodiment of the present application may include steps 101 to 103.
In step 101, when an external device connected to the terminal is detected, it is detected whether an audio list file corresponding to an audio file is stored in the external device.
In the embodiment of the present application, whether the audio list file corresponding to the audio file is stored in the external device may be detected based on the file name of the audio list file.
The audio list file may be named based on, among other things, the vendor identification code (VID), the product identification code (PID), and the hardware serial number (sn) of the external device.
When the terminal is a vehicle, the vehicle may monitor an insertion state of the external device after each start, and detect whether a file named by a vendor identification code (VID), a product identification code (PID), and a hardware serial number (sn) of the external device is stored in the external device when the external device connected to the terminal is detected, and determine whether an audio list file corresponding to the audio file is stored in the external device.
For example, it is detected whether an audio list file having a file name vid_pid_sn.txt is stored in the external device, and the following step 102 or step 103 is continuously performed according to the detection result.
It should be noted that the foregoing is merely illustrative of the naming manner of the audio list file, and it is understood that in some embodiments of the present application, the audio list file may be named based on other manners.
For example, the "audio list file" may be directly used as a file name, and the audio list file corresponding to the audio file in the external device may be named, which is not limited in this application.
In step 102, if the audio list file corresponding to the audio file is not stored in the external device, the audio file in the external device is scanned, and when any one of the target audio files is scanned, the target audio file is played.
In this embodiment of the present application, when an audio list file corresponding to an audio file is not stored in an external device, it indicates that the external device is connected to the terminal for the first time, so that it is necessary to scan the audio file in the external device, and after obtaining a storage path of any one target audio file, play the target audio file based on the storage path.
In the process of scanning the audio files in the external device, files conforming to the specified format can be used as the audio files. For example, a file in which one or more of MP3 format, WAV format, WMA format, MP2 format, flac format, MIDI format, RA format, APE format, AAC format, CDA format, MOV format can be played by the terminal is used as an audio file.
According to the method and the device, in the process of scanning the audio files in the external equipment, when any one target audio file in the audio files is scanned, the target audio file is directly played, instead of waiting for the completion of the full-disc scanning of the external equipment, then the audio playing is started, and therefore the loading speed of the audio can be improved.
In some embodiments of the present application, in order to enable the external device to connect to the terminal next time, audio playing may be performed based on the audio list file, after the step 102, scanning may be continued on the audio file in the external device, and the audio list file may be generated and stored according to the scanning result.
Specifically, in the process of generating the audio list file according to the scanning result, the storage path and the file identifier of the scanned audio file may be stored in a list form, that is, the audio list file carrying the storage path and the file identifier of the audio file in the external device is generated.
When the audio list file is stored, the audio list file can be stored on an external device or a terminal.
Specifically, when the audio list file is stored, the storage space required to be occupied by the generated audio list file and whether the remaining storage space of the external device is larger than the storage space required to be occupied by the audio list file can be calculated first, and when the remaining storage space of the external device is larger than the storage space required to be occupied by the audio list file, the generated audio list file is stored in the external device, so that when the external device is connected with other terminals, the other terminals can realize quick play of the audio based on the audio list file.
In some embodiments of the present application, when the remaining storage space of the external device is smaller than or equal to the storage space that needs to be occupied by the audio list file, the generated audio list file may also be stored in the terminal, and accordingly, the step 102 may specifically be: if the audio list file corresponding to the audio file is not stored in the external device, detecting whether the audio list file corresponding to the audio file is stored in the terminal, if the audio list file corresponding to the audio file is not stored in the terminal, scanning the audio file in the external device, and playing the target audio file when any one target audio file in the audio files is scanned.
That is, when it is detected that the audio list file is not stored in the external device, it is first detected whether the audio list file is also not stored in the terminal, and when the audio list file is stored in the terminal, the audio file stored in the external device is played based on the audio list file stored in the terminal, and when the audio list file is also not stored in the terminal, the audio file in the external device is scanned, and when any one of the target audio files is scanned, the target audio file is played.
In addition, in some embodiments of the present application, when the audio list file is saved, in order to avoid that the audio list file is deleted by mistake, the attribute of the audio list file may also be set as a hidden attribute.
In step 103, if the external device stores the audio list file corresponding to the audio file, the audio file stored in the external device is played according to the audio file information carried in the audio list file.
In this embodiment of the present application, the audio file information carried in the audio list file may include a storage path and a file identifier of an audio file stored in the external device.
The file identifier may include a file name of the audio file.
In an embodiment of the present application, in implementing the foregoing step 103, in a process of playing an audio file stored in an external device according to audio file information carried in an audio list file, audio file playing may be performed according to a storage path and a file identifier of any one audio file stored in the external device carried in the audio list file, so that when the terminal detects an external device connected to the external device, and when the external device stores an audio file list, audio playing may be performed directly according to the audio file list, without waiting for the terminal to perform full-disc scanning on the external device, and then performing audio playing, thereby improving a loading speed of the audio file.
In another embodiment of the present application, the audio file information carried in the audio list file may further include a file identifier and a storage path of a currently played audio file when the terminal ends playing the audio file. Correspondingly, in the process of playing the audio file stored in the external device according to the audio file information carried in the audio list file in the step 103, the current playing audio file stored in the external device can be played according to the file identifier and the storage path of the current playing audio file when the terminal finishes playing the audio file.
Specifically, when an audio list file corresponding to an audio file is stored in the external device, it indicates that the external device is not connected to the terminal for the first time, and in the last connection process between the external device and the terminal, the file identifier and the storage path of the audio file being played by the terminal can be recorded in the audio list file.
For example, the terminal may record the file identification and the storage path of the audio file being played by the terminal in the audio list file each time the audio file play is ended, so that the terminal may continue playing the audio file from the position where the audio file play was last ended when the external device is connected to the terminal next time.
When the terminal is a vehicle, after the vehicle is restarted, the audio playing device of the vehicle can directly read the file identifier and the storage path of the current playing audio file when the terminal carried in the audio list file in the U disk finishes playing the audio file when detecting that the U disk is inserted in the vehicle, so as to position the playing position of the audio file to the last playing position and continue playing the audio file.
In practical application, since the user may modify the audio file in the external device after finishing playing the audio file, so that the audio file corresponding to the file identifier and the storage path of the currently played audio file does not exist in the external device, in one embodiment, in the process of playing the currently played audio file stored in the external device according to the file identifier and the storage path of the currently played audio file, when the audio file corresponding to the file identifier and the storage path of the currently played audio file exists in the external device, the terminal may directly play the currently played audio file; when the file identifier of the current playing audio file and the audio file corresponding to the storage path do not exist in the external device, the terminal can play the next audio file corresponding to the current playing audio file according to the audio list file.
In addition, in order to improve the accuracy of the audio list file, as shown in fig. 2, in an embodiment of the present application, after the above step 103, the following step 104 may be further performed: rescanning the audio files in the external device, and updating the audio list files according to the rescanning result.
Specifically, in the process of updating the audio list file according to the rescanning result, in order to ensure the integrity of the audio list file, the audio list file is prevented from being damaged due to the fact that the external device is suddenly disconnected from the terminal in the process of reading and writing the audio list file, as shown in fig. 3, the step 104 may be specifically implemented by adopting the following steps 301 to 302.
Step 301, backing up the audio list file to obtain a backup file.
Step 302, updating the backup file according to the rescanning result, and copying the backup file when the backup file updating is completed to obtain an audio list file.
For example, the audio list file vid_pid_sn.txt is backed up as the backup file vid_pid_sn_bak.txt, then the backup file vid_pid_sn_bak.txt is updated according to the rescanning result, and when the update of the backup file vid_pid_sn_bak.txt is completed, the backup file vid_pid_sn_bak.txt is copied as the audio list file vid_pid_sn.txt, thereby obtaining the updated audio list file.
Based on the above update manner of the audio list file, correspondingly, in an embodiment of the present application, as shown in fig. 4, in implementing the above step 103, according to the audio file information carried in the audio list file, in playing the audio file stored in the external device, the following manners of steps 401 to 403 may also be specifically adopted.
In step 401, it is detected whether the audio list file is complete.
In this embodiment, the audio list file may be provided with an end-of-file identifier, and in implementing step 401, the integrity of the audio list file may be detected based on the end-of-file identifier.
For example, the end of file identifier may be a fixed value, such as 0x5A5A5A5A, etc., upon detecting that the last 4 bytes of data of the audio list file is 0x5A5A5A5A, it may be determined that the audio list file is complete, upon detecting that the last 4 bytes of data of the audio list file is not 0x5A, it may be determined that the audio list file is incomplete, i.e., the audio list file is corrupted.
Step 402, if the audio list file is complete, playing the audio file stored in the external device according to the audio file information carried in the audio list file.
Step 403, if the audio list file is incomplete, playing the audio file stored in the external device according to the audio file information carried in the backup file.
Specifically, since the audio list file is complete, it indicates that the audio list file is not updated, or that the updating has been completed successfully, that is, steps 301 to 302 are executed successfully, so that the audio file stored in the external device may be played directly according to the audio file information carried in the audio list file.
When the audio list file is incomplete, it means that the above-mentioned step 302 is not successfully performed, and the process of copying the backup file is not successfully performed after the backup file is updated, and at this time, the backup file is updated and is complete, so that the audio file stored in the external device can be played based on the audio file information carried in the backup file.
The method and the device for updating the audio list file based on the embodiment of the above figure 3 and playing the audio file based on the embodiment of the above figure 4 can effectively avoid adverse effects caused by disconnection of the connection between the external device and the terminal when the audio list file is read and written, ensure that the complete audio list file is stored on the external device or the terminal at any time, and ensure the integrity of the audio list file.
In the above embodiment of the present application, in the embodiment of the present application, when an external device connected to a terminal is detected, whether an audio list file corresponding to an audio file is stored in the external device is detected; when the audio list file corresponding to the audio file is not stored in the external equipment, the audio file in the external equipment is scanned, and when any one target audio file in the audio file is scanned, the target audio file is played; when the audio list files corresponding to the audio files are stored in the external equipment, the audio files stored in the external equipment are played according to the audio file information carried in the audio list files, so that when the external equipment is accessed to the terminal, the audio files can be quickly selected to be played without carrying out full-disc scanning on the external equipment, the problem that when the external equipment containing a large number of audio files is used as a song playing source, the terminal loads the audio slowly is solved, the user experience is effectively improved, and the effect of plug and play can be achieved by the external equipment.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of combinations of actions, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, and some steps may be performed in other order in some embodiments of the present application.
The embodiment of the present application further provides a playing device for an audio file, where the playing device is configured in a terminal, and the audio file is stored in an external device connected to the terminal, as shown in fig. 5, where the playing device may include a detecting unit 501, a first playing unit 502, and a second playing unit 503.
A detecting unit 501 configured to detect, when detecting an external device connected to a terminal, whether an audio list file corresponding to an audio file is stored in the external device;
the first playing unit 502 is configured to scan the audio files in the external device if the audio list file corresponding to the audio files is not stored in the external device, and play the target audio files when any one of the target audio files is scanned;
and the second playing unit 503 is configured to play the audio file stored in the external device according to the audio file information carried in the audio list file if the audio list file corresponding to the audio file is stored in the external device.
In one embodiment, the playing device may further include a generating unit, configured to, when the audio file in the external device is scanned, and when any one of the target audio files is scanned, play the target audio file, and then continue scanning the audio file in the external device, and generate and store an audio list file according to a result of the scanning.
In one embodiment, the generating unit is further configured to store the audio list file on an external device or a terminal;
the first playing unit is further configured to:
if the audio list file corresponding to the audio file is not stored in the external device, detecting whether the audio list file corresponding to the audio file is stored in the terminal,
if the audio list file corresponding to the audio file is not stored in the terminal, the audio file in the external device is scanned, and when any one target audio file in the audio files is scanned, the target audio file is played.
In one embodiment, the playing device may further include an updating unit, configured to rescan the audio file in the external device after playing the audio file stored in the external device according to the audio file information carried in the audio list file, and update the audio list file according to a result of the rescanning.
In one embodiment, the updating unit is specifically configured to backup the audio list file to obtain a backup file; updating the backup file according to the rescanning result, and copying the backup file when the backup file updating is completed to obtain an audio list file.
In one embodiment, the second playing unit is further configured to:
detecting the integrity of the audio list file;
if the audio list file is complete, playing the audio file stored in the external equipment according to the audio file information carried in the audio list file;
if the audio list file is incomplete, playing the audio file stored in the external device according to the audio file information carried in the backup file.
In one embodiment, the audio file information includes a file identifier and a storage path of a currently played audio file when the terminal ends playing the audio file;
the second playing unit is further configured to: and playing the current playing audio file stored in the external equipment according to the file identification and the storage path of the current playing audio file.
It should be noted that, for convenience and brevity of description, the specific working process of the playing device 500 described above may refer to the corresponding process of the method described in fig. 1 to 4, and will not be described herein.
As shown in fig. 6, the embodiment of the application further provides a terminal. The terminal can be an intelligent terminal such as a vehicle and a notebook computer. As shown in fig. 6, the terminal 6 may include: a processor 60, a memory 61 and a computer program 62 stored in the memory 61 and executable on the processor 60. The steps of the above-described embodiments of the playing method of the respective audio files are implemented when the processor 60 executes the computer program 62, for example, steps 101 to 103 shown in fig. 1.
The processor 60 may be a central processing unit (Central Processing Unit, CPU), other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. The general purpose processor may be a microprocessor, but in the alternative, it may be any conventional processor or the like.
The memory 61 may be an internal storage unit of the terminal 6, for example a hard disk or a memory. The memory 61 may also be an external storage device for the terminal 6, such as a plug-in hard disk provided on the terminal 6, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like. Further, the memory 61 may also include both an internal storage unit and an external storage device of the terminal 6. The memory 61 is used to store the above-mentioned computer programs and other programs and data required for the terminal.
The computer program may be divided into one or more units, which are stored in the memory 61 and executed by the processor 60 to complete the present application. The one or more units may be a series of instruction segments of a computer program capable of performing a specific function, the instruction segments describing a procedure of the computer program for executing the playing method of the audio file in the terminal.
For example, the above-described computer program may be divided into: the detection unit, the first playing unit and the second playing unit have the following specific functions:
a detection unit for detecting whether an audio list file corresponding to an audio file is stored in an external device when the external device connected with the terminal is detected;
the first playing unit is used for scanning the audio files in the external equipment if the audio list files corresponding to the audio files are not stored in the external equipment, and playing the target audio files when any one of the audio files is scanned;
and the second playing unit is used for playing the audio files stored in the external equipment according to the audio file information carried in the audio list files if the audio list files corresponding to the audio files are stored in the external equipment.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed terminal and method may be implemented in other manners. For example, the terminal embodiments described above are merely illustrative. For example, the division of a module or unit is merely a logical function division, and there may be another division manner when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via some interfaces, systems or units, which may be electrical, mechanical or otherwise.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the flow in the methods of the above embodiments, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a readable storage medium, where the computer program may implement the steps of the above embodiments of the methods when executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, executable files or in some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the content of the computer readable medium can be appropriately increased or decreased according to the requirements of the jurisdiction's jurisdiction and the patent practice, for example, in some jurisdictions, the computer readable medium does not include electrical carrier signals and telecommunication signals according to the jurisdiction and the patent practice.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A playback method of an audio file applied to a terminal, characterized in that the audio file is stored in an external device connected to the terminal, the playback method comprising:
detecting whether an audio list file corresponding to the audio file is stored in the external device or not when the external device connected with the terminal is detected;
if the audio list file corresponding to the audio file is not stored in the external equipment, scanning the audio file in the external equipment, and playing the target audio file when any one of the audio files is scanned;
and if the audio list file corresponding to the audio file is stored in the external equipment, playing the audio file stored in the external equipment according to the audio file information carried in the audio list file.
2. The method for playing audio files according to claim 1, wherein after said scanning said audio files in said external device and when any one of said audio files is scanned, playing said target audio file comprises:
and continuing to scan the audio files in the external equipment, and generating and storing the audio list files according to the scanning result.
3. The method for playing an audio file according to claim 2, wherein said saving said audio list file comprises:
storing the audio list file on the external device or the terminal;
if the audio list file corresponding to the audio file is not stored in the external device, scanning the audio file in the external device, and playing the target audio file when any one of the audio files is scanned, including:
if the audio list file corresponding to the audio file is not stored in the external equipment, detecting whether the audio list file corresponding to the audio file is stored in the terminal,
and if the audio list file corresponding to the audio file is not stored in the terminal, scanning the audio file in the external equipment, and playing the target audio file when any one of the audio files is scanned.
4. The audio file playing method according to any one of claims 1 to 3, wherein after playing the audio file stored in the external device according to the audio file information carried in the audio list file, the method comprises:
rescanning the audio files in the external equipment, and updating the audio list files according to the rescanning result.
5. The method for playing an audio file according to claim 4, wherein updating the audio list file according to the rescanning result comprises:
backing up the audio list file to obtain a backup file;
and updating the backup file according to the rescanning result, and copying the backup file when the backup file is updated, so as to obtain the audio list file.
6. The method for playing audio files according to claim 5, wherein playing audio files stored in the external device according to the audio file information carried in the audio list file comprises:
detecting whether the audio list file is complete;
if the audio list file is complete, playing the audio file stored in the external equipment according to the audio file information carried in the audio list file;
and if the audio list file is incomplete, playing the audio file stored in the external equipment according to the audio file information carried in the backup file.
7. A method of playing an audio file according to any one of claims 1 to 3, wherein the audio file information includes a file identification and a storage path of a currently played audio file when the terminal ends the playing of the audio file;
the playing the audio files stored in the external device according to the audio file information carried in the audio list file comprises the following steps:
and playing the current playing audio file stored in the external equipment according to the file identification and the storage path of the current playing audio file.
8. A playback apparatus of an audio file, the playback apparatus being configured in a terminal, characterized in that the audio file is stored in an external device connected to the terminal, the playback apparatus comprising:
a detection unit, configured to detect, when detecting the external device connected to the terminal, whether an audio list file corresponding to the audio file is stored in the external device;
a first playing unit, configured to scan the audio files in the external device if the audio list file corresponding to the audio files is not stored in the external device, and play any one target audio file in the audio files when the target audio file is scanned;
and the second playing unit is used for playing the audio files stored in the external equipment according to the audio file information carried in the audio list files if the audio list files corresponding to the audio files are stored in the external equipment.
9. A terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the computer program when executed by the processor realizes the steps of the method for playing an audio file according to any one of claims 1-7.
10. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor performs the steps of the method of playing an audio file according to any one of claims 1-7.
CN202310466620.3A 2023-04-24 2023-04-24 Audio file playing method, playing device, terminal and readable storage medium Pending CN116560615A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310466620.3A CN116560615A (en) 2023-04-24 2023-04-24 Audio file playing method, playing device, terminal and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310466620.3A CN116560615A (en) 2023-04-24 2023-04-24 Audio file playing method, playing device, terminal and readable storage medium

Publications (1)

Publication Number Publication Date
CN116560615A true CN116560615A (en) 2023-08-08

Family

ID=87493938

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310466620.3A Pending CN116560615A (en) 2023-04-24 2023-04-24 Audio file playing method, playing device, terminal and readable storage medium

Country Status (1)

Country Link
CN (1) CN116560615A (en)

Similar Documents

Publication Publication Date Title
KR101157433B1 (en) Delivery of a message to a user of a portable data storage device as a condition of its use
US6601139B1 (en) Information processing method and apparatus using a storage medium storing all necessary software and content to configure and operate the apparatus
JP5243430B2 (en) Method and apparatus for updating consumer product software
US7359626B2 (en) Image mastering API
US10191838B2 (en) Method and device for checking influence of deleting cache file, and mobile terminal
US20080117548A1 (en) Storage Device And Storage System
CN1719540A (en) System and method for embedding optical drive compatibility information in optical media
KR100586063B1 (en) Data structure of flash memory with variable size system field which can be updated, usb memory therewith and a control method of the system field
US20070217767A1 (en) Method of managing media files and media playback apparatus
CN116560615A (en) Audio file playing method, playing device, terminal and readable storage medium
US20080288099A1 (en) Digital media player with improved user experience
US8655463B2 (en) Method for avoiding refreshing a database of metadata associated with digital media content
CN112148220B (en) Method, device, computer storage medium and terminal for realizing data processing
JPH1083258A (en) Test method for cd-rom drive
CN112130765A (en) EEPROM data reading and writing method and device
CN112380226A (en) Data loading method and device, electronic equipment and storage medium
CN112036133A (en) File saving method and device, electronic equipment and storage medium
US7685592B2 (en) Method and device for updating program functions corresponding to a version flag
KR20100029183A (en) Digital media player and method for avoiding refreshing a database of metadata associated with digital media content and for providing an improved user experience
CN109558072B (en) Storage space expansion method and system of audio playing chip, audio playing chip and storage device
CN117687667A (en) Firmware updating method, device, terminal equipment and storage medium
CN112540889B (en) Method, device, equipment and medium for adjusting hard disk starting sequence in user mode
US20060002245A1 (en) Content storage apparatus and method, and content storage system
CN114490437A (en) Data writing method and device for serial peripheral interface flash memory
CN115952034A (en) System intelligent repair method, electronic device and computer storage medium

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