Page 355 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 355

} catch (LineUnavailableException | IOException e2) {
                                            // TODO Auto-generated catch block
                                            e2.printStackTrace();
                                        }
                                    }
                                    break;
                                }
                            }
                        }
                    }

                }
                 // 소리 수신
                class Recieve implements Runnable {

                    byte[] buf = new byte[buffersize];
                    int count;

                    @Override
                    public void run() {
                        // TODO Auto-generated method stub
                        while (Rtrigger) {
                            try {
                                if ((count = soundInputStream.read(buf, 0, buf.length)) != -1) {
                                    sourceDataLine.write(buf, 0, count);
                                }
                            } catch (IOException e) {
                                // TODO Auto-generated catch block
                                e.printStackTrace();
                            }
                        }
                    }

                }

            }














                                                         -  348  -
   350   351   352   353   354   355   356   357   358   359   360