当前位置: 首页>>代码示例>>Java>>正文


Java AudioFile.commit方法代码示例

本文整理汇总了Java中org.jaudiotagger.audio.AudioFile.commit方法的典型用法代码示例。如果您正苦于以下问题:Java AudioFile.commit方法的具体用法?Java AudioFile.commit怎么用?Java AudioFile.commit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jaudiotagger.audio.AudioFile的用法示例。


在下文中一共展示了AudioFile.commit方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: commitAudio

import org.jaudiotagger.audio.AudioFile; //导入方法依赖的package包/类
private void commitAudio(Context context, AudioFile f, File file) {
    try {
        f.commit();
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            Intent mediaScanIntent = new Intent(
                    Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
            Uri contentUri = Uri.fromFile(file);
            mediaScanIntent.setData(contentUri);
            context.sendBroadcast(mediaScanIntent);
        } else {
            context.sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" + Utils.getStoragePath(context))));
        }
    } catch (CannotWriteException e) {
        e.printStackTrace();
    }
}
 
开发者ID:AnandChowdhary,项目名称:saga-android,代码行数:17,代码来源:DownloadReceiver.java

示例2: delete

import org.jaudiotagger.audio.AudioFile; //导入方法依赖的package包/类
/**
 * Delete the Id3v1 and ID3v2 tags from file
 *
 * @param af
 * @throws CannotReadException
 * @throws CannotWriteException
 */
@Override
public synchronized void delete(AudioFile af) throws CannotReadException, CannotWriteException
{
    ((MP3File)af).setID3v1Tag(null);
    ((MP3File)af).setID3v2Tag(null);                
    af.commit();
}
 
开发者ID:GlennioTech,项目名称:MetadataEditor,代码行数:15,代码来源:MP3FileWriter.java

示例3: deleteTag

import org.jaudiotagger.audio.AudioFile; //导入方法依赖的package包/类
public void deleteTag(AudioFile f) throws CannotWriteException
{
    //Because audio file is an instanceof MP3File this directs it to save
    //taking into account if the tag has been sent to null in which case it will be deleted
    f.commit();
}
 
开发者ID:GlennioTech,项目名称:MetadataEditor,代码行数:7,代码来源:MP3FileWriter.java

示例4: writeFile

import org.jaudiotagger.audio.AudioFile; //导入方法依赖的package包/类
public void writeFile(AudioFile f) throws CannotWriteException
{
    //Because audio file is an instanceof MP3File this directs it to save
    f.commit();
}
 
开发者ID:GlennioTech,项目名称:MetadataEditor,代码行数:6,代码来源:MP3FileWriter.java

示例5: deleteTag

import org.jaudiotagger.audio.AudioFile; //导入方法依赖的package包/类
public void deleteTag(AudioFile f) throws CannotWriteException {
    //Because audio file is an instanceof MP3File this directs it to save
    //taking into account if the tag has been sent to null in which case it will be deleted
    f.commit();
}
 
开发者ID:openaudible,项目名称:openaudible,代码行数:6,代码来源:MP3FileWriter.java

示例6: writeFile

import org.jaudiotagger.audio.AudioFile; //导入方法依赖的package包/类
public void writeFile(AudioFile f) throws CannotWriteException {
    //Because audio file is an instanceof MP3File this directs it to save
    f.commit();
}
 
开发者ID:openaudible,项目名称:openaudible,代码行数:5,代码来源:MP3FileWriter.java

示例7: writeFile

import org.jaudiotagger.audio.AudioFile; //导入方法依赖的package包/类
public static void writeFile(AudioFile audio) throws CannotWriteException {
    audio.commit();
}
 
开发者ID:h4h13,项目名称:RetroMusicPlayer,代码行数:4,代码来源:SAFUtil.java

示例8: delete

import org.jaudiotagger.audio.AudioFile; //导入方法依赖的package包/类
@Override
public synchronized void delete(AudioFile af) throws CannotReadException, CannotWriteException {
    ((MP3File) af).setID3v1Tag(null);
    ((MP3File) af).setID3v2Tag(null);
    af.commit();
}
 
开发者ID:Old-Geek,项目名称:Musique,代码行数:7,代码来源:MP3FileWriter.java

示例9: delete

import org.jaudiotagger.audio.AudioFile; //导入方法依赖的package包/类
/**
 * Delete the Id3v1 and ID3v2 tags from file
 *
 * @param af
 * @throws CannotReadException
 * @throws CannotWriteException
 */
@Override
public synchronized void delete(AudioFile af) throws CannotReadException, CannotWriteException {
    ((MP3File) af).setID3v1Tag(null);
    ((MP3File) af).setID3v2Tag(null);
    af.commit();
}
 
开发者ID:openaudible,项目名称:openaudible,代码行数:14,代码来源:MP3FileWriter.java


注:本文中的org.jaudiotagger.audio.AudioFile.commit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。