ãã®ãããé»è©±ã§äœ¿çšãããã»ãšãã©ãã¹ãŠã®ãµãŠã³ããã¡ã€ã«ã¯ã8kHzã®ããžã¿ã«åã§èšé²ãããŸãã 倧ããªãããŒã®åŠçãé«éåããããã«ã䜿çšãããå§çž®æ¹æ³ã¯åçŽã§ãç®çã®é³å£°å§çž®ã«é©çšããå Žåã«é©åãªçµæãç®æããŠããŸãã ããã¯ãåçŽãªããžã¿ã«åïŒ PCM ïŒãåçŽãªãã«ã¿ã³ãŒããã¯ïŒADPCMã G711 ïŒããŸãã¯ããªãããŒãªã³ãŒããã¯ïŒ GSM 06.10 ïŒã§ãã ãããã®åœ¢åŒã¯ããã¬ãã©ããŒã·ã¹ãã ã®ããã€ãã£ããã§ã-ã¢ã¹ã¿ãªã¹ã¯ãããªãŒã¹ã€ããïŒããã³ããããä»ã®ãã®ïŒã ãããã®ãã©ãŒãããã§ã¯ãã·ã¹ãã ã人ã ã«ãã¬ã€ããããã®ããŒã¿ãæºåãããã·ã¹ãã ã®åããã©ãŒãããã§èšé²ãèšé²ã§ããŸãã
ããããçŸåšããŠã§ãã¯å°çäžã§ãŸããŸãæ¡å€§ããŠããã人ã ã¯ãŠã§ãäžã®äŒè©±ãæšæ¶ãªã©ã®é²é³ãèããããšæã£ãŠããŸããmp3ã¯ããã€ãã£ãããã©ãŒãããã«ãªããŸãã...
çµæãšããŠããŸããªãã¢ãŒã«ã€ããèããæ©èœã®åçŽãªè§£æ±ºçã¯ãé²é³ãé»è©±åœ¢åŒããMP3ã«ãã©ã³ã¹ã³ãŒãããããã«ãµãŒããŒãæ§æããããšã§ãã
ãã¹ãŠãããŸããããŸãããïŒ
- mp3é²é³ã§ã¯ããã倧ãããŸãã¯ããæªããªããŸãã
- mp3ãžã®ãã©ã³ã¹ã³ãŒãã£ã³ã°ã«ã¯ããµãŒããŒCPUã®è² è·ãå¿ èŠã§ãã
- ãã©ã³ã¹ã³ãŒãã¯äºå®äžã§çºçãããªã³ã¶ãã©ã€ã§ã¯çºçããŸããïŒãã ããããã«å¯Ÿããæ²»çæ³ããããŸãïŒã
- ãã©ã³ã¹ã³ãŒãããããã¡ã€ã«ã¯ãåºæ¬çã«ã¯ã©ã€ã¢ã³ãã«ã®ã¿å¿ èŠã§ãã
ãã®äžåèªãèŠãŠããšã³ãžãã¢ã®éã¯ç æ°ã«ãªããããŸãããããã«èŠæ±ãå§ããŸããã ãããŠãããã¯ãæªãããšãããã®ã§ã¯ãªãããããã©ãã ã£ãããã§ã¯ãªããã€ãŸããããã¯è¯ãããšã§ãããç°¡åã§ãã ã§ã¯ããªãé«äŸ¡ãªMP3ãšã³ã³ãŒãæäœãå®è¡ãããã®ãã³ãŒããŒãæ¢ã«ååšãããšããçç±ã ãã§ãã¯ã©ã€ã¢ã³ãã§é«äŸ¡ãªMP3ãã³ãŒãæäœãå®è¡ããã®ã§ããããã ã¯ã©ã€ã¢ã³ãã§ãã®æãåçŽãªãã³ãŒããŒãäœæããŠã¿ãŸãããã
ãããã®æ¢è£œã®ãã³ãŒããŒããªãããšã«ç¹ã«é©ããŸããã ãããWavPlayerã®èªçæ¹æ³ã§ããé»è©±ãã¡ã€ã«çšã®ãã©ãã·ã¥ãã¬ãŒã€ãŒã§ãã
圌ã«ã§ããããšïŒ
- ã¬ã³ãŒãã«ãžã£ã³ãããããã®ã¹ããªããä»ãã®GUIããããªãã®GUIãéåžžã¯UIãªã
- JSåŽã§ã€ã³ã¿ãŒãã§ãŒã¹å šäœã管çããã³ã¬ã³ããªã³ã°ããããã®API
- ã³ãŒããã¯ãµããŒãïŒPCMãG.711u / aãGSM 06.10ãIMA ADPCM
- ãã©ãŒãããã®ãµããŒãïŒAUãWAVãããã€ãã®æšæºRAW
ãããŠæè¿ããŠãŒã¶ãŒã¯æšæºã®MP3ãã¬ãŒã€ãŒã«ãããã·ãè¿œå ããWavPlayerã®ã¿ã䜿çšããŠãã€ãã£ãã¢ãŒã«ã€ããšãã©ã³ã¹ã³ãŒãã¢ãŒã«ã€ãã®äž¡æ¹ãåçã§ããããã«ããŸããã ïŒåœåã¯ãFlash-mp3ãã¬ãŒã€ãŒãhtml5ããŸãã¯WavPlayerã䜿çšããããšãJSåŽã®é¢å¿äºã§ãããšä»®å®ããŠããããè¡ããŸããã§ããïŒã
åã³ãŒããã¯ãšãã©ãŒãããã®èª¬æãèªã人ã¯èª°ã§ãããã¬ãŒã€ãŒãæžæ»ã®ããã«åçŽã§ããããšãç解ããã§ãããã ãããããããããªããããã¯é·ãéååšããŠããã§ããã...ãããã£ãŠãç§ã¯ç°¡åã«ãã®åµé ã®ç©èªãèªããŸãã
åœåããã©ãã·ã¥ã§ãµãŠã³ããåçããã®ã¯ãmp3ã€ã³ãµãŒãã®åçã®ã¿ã§ããã ããã ãã§ã ãã以äžã 10çªç®ã®ããŒãžã§ã³ãããsampleDataã€ãã³ããflash.media.Soundã®ã€ã³ã¿ãŒãã§ã€ã¹ã«ç»å ŽããŸãããããã«ãããçæããããµãŠã³ããçæããã³åçã§ããŸãã ãããããã©ãã·ã¥ã«ãµããããã®ã§ã圌ã¯ç¬èªã®æ¹æ³ã§ã®ã¿ãããè¡ããŸãã44kHzã®ã¿ãã¹ãã¬ãªã®ã¿ã32ãããæµ®åå°æ°ç¹æ°ã®ã¿ã§ãã
ãããŠã8kHz / 16kHzã®æŽæ°ããããŸãã ãœãŒã¹ããŒã¿ãååŸãããã®ãŸãŸã®ç¶æ ã§æäŸããã ãã®å Žåãèªã¿åããäžååã§é »åºŠãéåžžã«é«ããªããŸãã çµè«ã¯ïŒ ç§ãã¡ãæã£ãŠãããµã³ãã«ãè£éããå¿ èŠããããŸã-èšãæããã°ããªãµã³ãã«ããŸãã
ãªãµã³ããªã³ã°ãããšããåšæ³¢æ°ãåçŽã«2åã«ããŠãã2ã€ã®ãµã³ãã«ã®éã«ãå¹³åãæ°ãåã蟌ãã§æ¿å ¥ããããšã¯ã§ããªãããšãç解ããããšãéèŠã§ãã æ£ãããªãµã³ããªã³ã°ã¯ãå ã®æ»ãããªé³ã埩å ãïŒ2次å°é¢æ°ãæå°åïŒãç®çã®åšæ³¢æ°ã§åããžã¿ã«åããããšã«ããåŸãããŸãã ãã®ããã«ããŠãé©åãªãµã³ãã«ã¬ãŒãã§é©åãªæ»ãããªãµãŠã³ããååŸããŸãã
ç§ã¯ãã¡ããçè«ãç¥ã£ãŠããŸãããå®éã«ã¯éåžžã«æ ãè ã§ãããã¿ã¹ã¯ã¯ãã¬ã³ãŒããåçãããããšãéåžžã«éãããããšã§ããã®ã§ãè¿ éã«è§£æ±ºããå¿ èŠããããŸããã ç§ã¯ç¥ããªããã©ãã·ã¥ãããã³Linuxã§åäœãããã·ã³ã ãã©ãã·ã¥ã³ã³ãã€ã©ã®ãµã€ãºã確èªããŸããã100ã¡ãŒãã«ã§å£ããŠããŸã£ãããããã©ãã·ã¥ã«ãã°ããç°¡åã«æç»ããããã®ä»£æ¿æ段ãèŠã€ããããšã«ããŸããã ã¯ã€ãã¯ã°ãŒã°ã«ã¯ããã°ããããªãã·ã§ã³-HaXeãæäŸããŸãã ã ã·ã³ãã«ãªC / javaã®ãããªèšèªã§ãå¿ èŠãªãã©ãããã©ãŒã ïŒãã©ãã·ã¥ïŒãå«ãè€æ°ã®ã¿ãŒã²ãããã©ãããã©ãŒã ã«ç¿»èš³ã§ããŸãã 圌ã¯é£ããŠè¡ãããŸããã
äžè¬ã«ã æåã®äœæ¥ã¬ã€ã¢ãŠãã¯æ¥ãã§ã¹ã¯ã©ã³ãã«ãããŸããã
oggãã¡ã€ã«ãæåã§ãã³ãŒããããfoggãããžã§ã¯ãããããŸããã ããããããã«ã®ä»£ããã«ããã·ã¥ã€ã³ã¿ãŒãã§ã€ã¹ãå®è£ ããAudioSinkãååŸãããŸãããæžã蟌ã¿å ã®ãããã¡ãŒã§ããã©ãã·ã¥ã次ã®ããŒã¿ãå¿ èŠãšããå ŽåãAudioSinkã¯ãããã¡ãŒããããŒã¿ãéä¿¡ããŸãã æãæé©ã§çŸããå®è£ ã§ã¯ãããŸããããæ¢è£œã§ãã ãªãµã³ãã©ãŒãšããŠãOpenJDKã®Lanczosãªãµã³ãã©ãŒå®è£ ïŒsincé¢æ°ã«åºã¥ããæé«å質ïŒãæ¡çšãããŸããã ã³ãŒãã¯æé©ã§ã¯ãããŸããïŒåŸã§çŽç²ãªã¢ã¯ã·ã§ã³ã¹ã¯ãªããã«å®è£ ãããŸãã-ã»ãŒ4åé«éåã§ããŸããïŒããåäœããŸãïŒä»ã«äœãå¿ èŠãããŸããã§ããïŒã
ã€ã³ã¿ãŒãã§ãŒã¹ã¯ã·ã³ãã«ã§ããäžè§åœ¢ãæãããŠããå Žåã¯æç»ããŸãã ã¯ãªãã¯ãããšãplayïŒïŒãèµ·åããæ£æ¹åœ¢ãæãããŸãã ã¯ãªãã¯ãããšã2æ¬ã®åçŽã¹ãã£ãã¯ãæãããŸãã
G711ã®ãã³ãŒãã§ã¯ãã³ãŒãã¯SoxããååŸãããŸãããPCMã®å Žåãã³ãŒãã¯ããèªäœã§çæãããŸããã
ãããŠãã¡ããããã®Tyrocodeã®ãã¬ã«ãžã®OOPã¹ããŒã³ïŒFileããã³Decoderã€ã³ã¿ãŒãã§ãŒã¹ã¯ãã¡ã€ã³ãã¬ã€ã€ãŒãç¹å®ã®ããªãšãŒã·ã§ã³ããæœè±¡åã§ããããã«ããŸãã 確ãã«ãã€ã³ã¿ãŒãã§ãŒã¹ã¯äœç³»çã«ã§ã¯ãªããå¿ ç¶çã«çãŸããŸãããããã€éããŸãããïŒ ãã¡ã€ã«ã¯æ¬¡ã®ããã«æ©èœããŸã-ãã¡ã€ã«ã®å ¥åããŒã¿ãèªã¿åãããããã·ã¥ïŒïŒã¡ãœãããä»ããŠãã³ãŒããŒã«æŒã蟌ãŸããŸãã ãã¹ãŠã®ããããŒãèªã¿åããããšããã«ããã¡ã€ã«ã¯é©åãªåœ¢åŒã®ãã³ãŒããŒãå éšã«äœæãããªãŒãã£ãªããŒã¿ãããã«è©°ã蟌ã¿å§ããŸãã readyïŒïŒã¡ãœããã¯trueãè¿ãå§ãããã以éãä»ã®ãã¹ãŠã®ã¹ããªãŒã ã¡ã¿ããŒã¿ã¡ãœãããæå¹ã«ãªããŸããgetSamplesïŒïŒãªã¯ãšã¹ãã䜿çšããŠãªãŒãã£ãªã¹ããªãŒã ããŒã¿ãèªã¿åãããšãã§ããŸããããã¯ãsamplesAvailableïŒïŒãµã³ãã«ãè¿ããŸãã
ãã³ãŒããŒã®æäœãç°¡åã§ãããµã³ãã«ã®ãµã€ãºããã€ãåäœã§äŒéãããã¡ã€ã«ãå¿ èŠãªãã±ããã«åå²ããŠãã³ãŒããŒã«å ¥åã§ããããã«ããŸãã ãã³ãŒããŒã¯ããããã¡ãŒããŒã¿ã1ã€ã®ãµã³ãã«ïŒç¬Šå·ä»ãæµ®åå°æ°ç¹æ°ïŒã«é 次å€æããŸãã
çºçããäž»ãªåé¡ã¯ããµã³ãã©ãŒã®é©åãªäŸçµŠã§ãã ãªãµã³ãã©ãŒã¯ä»®æ³ããã«å€æã®åçã§åäœããããšãæãåºããŠãã ãã-å ¥åãµã³ããªã³ã°åšæ³¢æ°ã®å ¥åããŒã¿ã«åºã¥ããŠãæ»ãããªä¿¡å·ã埩å ãããåºååšæ³¢æ°ã§åããžã¿ã«åãããŸãã ä¿¡å·ã埩å ããã«ã¯ãåžžã«ä¿¡å·ãå¿ èŠã§ãã ãã®ãããæåã«åæåã®ããã«ããã³ãŒãã«åžæããé·ãã®ç¡é³ãäŸçµŠããå¿ èŠããããŸãã ãããŠãæåã®çããããã®æ²é»ãæšãŠãŠãã ãããããããã°ãæåããæ£ãããªãµã³ããªã³ã°ãåŸãããŸãã åæ§ã«ãããŒã¿ãçµäºããåŸã埩å ããããã¹ãŠã®æ å ±ãååŸããããã«ããªãµã³ãã©ãŒã«ç¡é³ãäŸçµŠãããå¿ èŠããããŸãã
ãããŠããã®ãããªããã«ãŒã䜿çšããŠãå µå£«ã®äŒç€Ÿã¯æ£ãã圢åŒã§44 kHzã§å¿ èŠãªããŒã¿éãæ£ç¢ºã«çæããŸãã
ããŒã¹ãã¬ãŒã€ãŒãåäœãå§ããåŸãå°ãããç¶ã«ãªãå§ããŸããããŸããããè€éãªã³ãŒããã¯ãç¹ã«gsmã®ãµããŒãã ãã¹ãŠããµã³ãã«ããšã«ãã³ãŒããããããã§ã¯ãªããããã§ãããåŠçãå¿ èŠã§ããããšãããã«æããã«ãªããŸããããã®ããããã³ãŒããŒã€ã³ã¿ãŒãã§ã€ã¹ã¯å ¥åé å+ãªãã»ãããåºåé å+ãªãã»ããçšã«ããçŽãããåºåã«é 眮ããããµã³ãã«æ°ãè¿ããŸãã Rawãã¡ã€ã«ããµããŒãããããã«ãã³ãŒãã®å€§éšåã¯æ±çšã§ãããå¥ã®äžè¬ã¯ã©ã¹ã«ç§»åããããããæå°å€-åæååã®å¿ é ãã©ã¡ãŒã¿ãŒã®ã¿ããªãŒããŒã©ã€ããããŸããã GSMãã³ãŒããŒèªäœã¯ãæ€åºãããå Žæã§éåžžã©ããã«äœ¿çšãããç®çã®æ§æã«ãã°ããå€æãããŸããã å¥åŠãªããšã«ãããã¯ãã¹ãŠåŒ·æã§åäœããŸããã
åæã«ããã¬ãŒã€ãŒã³ã³ãããŒã«ã€ã³ã¿ãŒãã§ã€ã¹ã¯JSã³ãŒãããæç»ãããããŒããåçãäžæåæ¢ã®ã€ãã³ããçºè¡ãããããããã©ãŠã¶ãŒã§ãã¬ãŒã€ãŒã®ç¶æ ãå¿ èŠã«å¿ããŠæç»ã§ããŸãã çµæãšããŠåŸããã補åã¯ãçç£ã§è£œæããå§ããŸããã 圌ãããã¹ããå§ãããšããããã€ãã®åé¡ãåºãŸãããç¹ã«ãéåžžã«æãããŠããIEã§ã¯ãæççã«ããŒãããããã¡ã€ã«ã¯8kãŸãã¯4kã®ããã§ã...äžè¬çã«ã倧éã®ã€ãã³ããçæãããã®ã§ããããã®çæã®é »åºŠãåæžããå¿ èŠããããŸããã
æ®å¿µãªããã誰ãJSã«ã€ã³ã¿ãŒãã§ãŒã¹ãäœæããããšã¯æããªãããšãããã«æããã«ãªããŸããã ãã®åŸãããã«æ±ºå®ãäžãããå åŽããã°ã¢ãã²ããŸã§æ·±ãæããŸããã ãã¬ãŒã€ãŒã¯å éšã€ãã³ããçæãå§ããWavPlayerGuiãäœæãããŸããã 圌ã®ããçžç¶äººã¯ä»¥åã®ãŸãŸã§ã-ãã¹ãŠã®ãã¿ã³ã ããã«ãå·ŠåŽã«åããã¿ã³ããããå³åŽã«ããã°ã¬ã¹ããŒããããé·ããããŒããããããªã¥ãŒã ãçŸåšã®äœçœ®ã衚瀺ãããŸãã ããŠãããã¯ãã€ãã³ãã«å¿ããŠãµã€ãºãå€åãããããå°ãæ£æ¹åœ¢ã®æçã§ãã
ãããçŸãããšããã«ãäžè¬çã«ããããã§ãã¯ããå¿ èŠãããããšãæããã«ãªããŸããã ãšã«ããã15åãã3åãèãå¿ èŠãããå Žåã«ã®ã¿ãé²é³ãèãããšã¯å®å šã«æãã§ã...ã·ãŒã¯ïŒïŒãè¡ãå¿ èŠããããŸãã ãã®å Žåã®seekïŒïŒã®å®è£ ã¯æãå°é£ãªã¿ã¹ã¯ã§ããããšãå€æããŸããããœãŒã¹ãã¡ã€ã«ãä»»æã®äœçœ®ããããŠã³ããŒãã§ããªãããïŒãµãŒããŒããRangeãµããŒããä¿èšŒã§ããããã©ãã·ã¥ã§ãããè¡ãã®ã¯ããã»ã©ç°¡åã§ã¯ãããŸããïŒãseekã®å¯èœæ§ãå¶éããå¿ èŠããããŸããïŒ ïŒ 'ãã ããããŒããããããŒãå ã®ã¿ã ãã ãããã®å Žåã§ãã44 kHzã«ãã©ã³ã¹ã³ãŒããããããŒã¿ïŒã¡ã¢ãªãæ³£ãèšãç³ãèš³ãããŸããïŒã®å šéã¯ä¿åãããªããããåé 眮ããå¿ èŠãããå Žåã¯ã次ã®ããã«ãªããŸãã
- seekïŒïŒãæ¢è£œã®44kHzããŒã¿ã®å¶éå ã«åãŸããã©ããã確èªããŸãããã®å ŽåãæºåãããããŒã¿ã䜿çšããŠåçŽãªããŒã¿ãäœæããŸãã
- åºãŠããå Žåã¯ãå ã®ã¹ããªãŒã ã®èŠ³ç¹ããåçãéå§ãããµã³ãã«ãæ¢ããŸã
- ååæåãããç¡é³ãªãµã³ãã©ã
- å ¥åã¹ããªãŒã ã¯ç®çã®äœçœ®ã«åé 眮ããã
- åçãéå§ããŸãã
ãã®åŸãäžè¬ã«ããã䜿çšãå§ãã人ããããã€ãã®å粧åã®ä¿®æ£ããããŸããããããŠåã³ææŠããããŸãã-IMA ADPCMãµããŒããäœãããšã¯å¯èœã§ããïŒ ãã®ãã©ãŒãããã¯ãæ®éçã§ãããšãã芳ç¹ããã¯ããªãå«ã§ããããŒã¿ã¯ãã£ãã«ããšã§ã¯ãªããåãå Žæã§æ··åãããããããã³ãŒãããããã£ãã«ããã³ãŒãã«éä¿¡ããå¿ èŠããããŸããã åæã«ãä»ã®ãã¹ãŠã®ã³ãŒããã¯ã«å¯ŸããŠå°ãæ®éæ§ãæããªããã°ãªããŸããã§ãããåºåããŒã¿ã®éã¯ãä»ã®ãã¹ãŠã®ã³ãŒããã¯ã®å ¥åã«å¿ããŠåºå®ãããã·ã³ãã«ã ããã§ãã ãããŠããã§...äžè¬ã«ãããã¯äŸåããŸã-æ確ãªã¹ããŒãªãŒãå¿ èŠã§ãããä»»æã®å Žæãããã³ãŒããéå§ããããšã¯ã§ããŸããã ãããã£ãŠãseekïŒïŒã®å Žåãé¢æ°ã¯æ¬¡ã®ããã«æ©èœããŸãã
- seekïŒïŒãæ¢è£œã®44kHzããŒã¿ã®å¶éå ã«åãŸããã©ããã確èªããŸã-ããã§ããã°ãæºåãããããŒã¿ã䜿çšããŠsicãäœæããŸã
- åºãŠããå Žåã¯ãå ã®ã¹ããªãŒã ã®èŠ³ç¹ããåçãéå§ãããµã³ãã«ãæ¢ããŸã
- ãã³ãŒããéå§ã§ãããµã³ãã«ãæ¢ããŠããŸã
- ååæåãããç¡é³ãªãµã³ãã©ã
- å ¥åã¹ããªãŒã ã¯ãã³ãŒãäœçœ®ã«åé 眮ãããŸã
- åçãéå§ããäœçœ®ã«ãã³ãŒãããŠã¹ããŒãã
- åçãéå§ããŸãã
äžè¬ã«ãå¥åŠãªããšã«ããããæ©èœããŸãã ãããŠçŸæç¹ã§ã¯ããã¹ãŠã®äººã䜿çšã§ããŸããå¿ èŠãªãã®ãæ£ç¢ºã«ãå¿ èŠãªæ¹æ³ã§å®è¡ããŸãã
å®å šãªã¹ãªã«ã®ããã«ãç§ãã¡ã®Webéçºè ãããããšæã£ãŠããJSã®ãŸãã«ãŸãã«ã€ã³ã¿ãŒãã§ãŒã¹ãããšã«ããäœãäžããããšã ããæ®ã£ãŠããŸãã ããã«ãã·ã³ãã«ã§ããããããçµ±åäŸãäœæããŠããµã€ãã«ã³ããŒã¢ã³ãããŒã¹ãããããšãã§ããŸããã»ãšãã©ã®å Žåããã®çµ±åã®åé¡ã¯ããã°ã©ãã§ã¯ãªãã·ã¹ãã 管çè ã®è©ã«ããã£ãŠããããã§ãã
Githubã®ãããžã§ã¯ã | ãªã³ã©ã€ã³ãã¢ã