Skip to content

Commit

Permalink
feat: shinmeikai8 audio source (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aquafina-water-bottle authored May 28, 2023
1 parent f678664 commit 8daeb65
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.kamwithk.ankiconnectandroid.routing.localaudiosource.JPodAudioSource;
import com.kamwithk.ankiconnectandroid.routing.localaudiosource.LocalAudioSource;
import com.kamwithk.ankiconnectandroid.routing.localaudiosource.NHK16AudioSource;
import com.kamwithk.ankiconnectandroid.routing.localaudiosource.Shinmeikai8AudioSource;

import java.io.ByteArrayInputStream;
import java.io.File;
Expand Down Expand Up @@ -63,9 +64,11 @@ public LocalAudioAPIRouting(Context context) {

this.sourceIdToSource = new HashMap<>();

// TODO: read config
this.sourceIdToSource.put("jpod", new JPodAudioSource());
this.sourceIdToSource.put("jpod_alternate", new JPodAltAudioSource());
this.sourceIdToSource.put("nhk16", new NHK16AudioSource());
this.sourceIdToSource.put("shinmeikai8", new Shinmeikai8AudioSource());
this.sourceIdToSource.put("forvo", new ForvoAudioSource());
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.kamwithk.ankiconnectandroid.routing.localaudiosource;

import com.kamwithk.ankiconnectandroid.routing.database.Entry;

public class Shinmeikai8AudioSource extends LocalAudioSource {
public Shinmeikai8AudioSource() {
super("shinmeikai8", "user_files/shinmeikai8_files");
}

@Override
public String getSourceName(Entry entry) {
return "SMK8 " + entry.display;
}
}

0 comments on commit 8daeb65

Please # to comment.